Tag: docker compose

Gitlab CI runner not able to expose ports of nested Docker containers

When using GitLab CI, as well as the gitlab-ci-multi-runner, I’m unable to get internally-started Docker containers to expose their ports to the “host”, which is the Docker image in which the build is running. My .gitlab-ci.yml file: test: image: docker stage: test services: – docker:dind script: – APP_CONTAINER_ID=`docker run -d –privileged -p “9143:9143” appropriate/nc nc […]

Running docker-compose on a docker gitlab-ci-multi-runner

I have a project running on Docker with docker-compose for dev environment. I want to get it running on GitLabCI with a gitlab-ci-multi-runner “Docker mode” instance. Here is my .gitlab-ci.yml file: image: soullivaneuh/docker-bash before_script: – apk add –update bash curl – curl –silent –location https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose – chmod +x /usr/local/bin/docker-compose – ./configure […]

Difference between service and container in docker compose

I was going through volumes_from option in docker compose. Apparently you can import a volumes from either a container or a service. From the docker compose documentation it is: volumes_from Mount all of the volumes from another service or container, optionally specifying read-only access(ro) or read-write(rw). volumes_from: – service_name – service_name:ro – container:container_name – container:container_name:rw […]

Custom nginx container exits immediately when part of docker-compose

I’m trying to learn how to use docker compose with a simple setup of an nginx container that reroutes requests to a ghost container. I’m using the standard ghost image but have a custom nginx image (that inherits from the standard image). When I run the composition using “docker-compose up” it exits immediately with “docker_nginx_1 […]

How to override the default value of COMPOSE_HTTP_TIMEOUT with docker-compose commnad

I have docker-compose which fetches some of the images and builds one. When I run docker-compose up , I am getting the following error ERROR: An HTTP request took too long to complete. Retry with –verbose to obtain debug information. If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to […]

Docker compose, running containers in net:host

I want to spawn 3 services in the “host” net using docker-compose. Here is my docker-conpose.yml file: version: ‘2’ services: mysql: image: mysql net: “host” nginx: image: nginx net: “host” app: image: tomcat net: “host” I got the following error: $ docker-compose up [31mERROR[0m: Validation failed in file ‘.\docker-compose.yml’, reason(s): Unsupported config option for services.app: […]

docker-compose : Unsupported config option for services service: 'web'

I am going through getting started page for docker-compose: https://docs.docker.com/compose/gettingstarted/ In Step 3, I made a docker-compose.yml file as described: version: ‘2’ services: web: build: . ports: – “5000:5000” volumes: – .:/code depends_on: – redis redis: image: redis But when I run: $ docker-compose up I get following error: Unsupported config option for services service: […]

Docker-Compose can't connect to Docker Daemon

I am getting an error message saying I can’t connect to the docker daemon. I have looked into other people’s answers who have had similar issues but it hasn’t helped. I am running Ubuntu 15.10. I will try to provide all the info I have. root@devinduval-Dell-System-XPS-15Z:/home/devinduval/projects/polaris/polaris-proj-all# docker-compose -f docker-compose-deps.yml up -d ERROR: Couldn’t connect to […]

Links between containers not working with docker-compose version 2

Linking between containers in a version 2 docker-compose file is not working. Only when using the ‘old’ version 1 format, I do see the link in /etc/hosts of the container. I have the following basic version 2 docker-compose.yml file. version: ‘2’ services: my-app: image: tomcat:8.0 container_name: my-app1 links: – my-redis my-redis: image: redis container_name: my-redis1 […]

How to tag docker image with docker-compose

I want to build image via docker-compose and set specific tag to it. Documentation says: Compose will build and tag it with a generated name, and use that image thereafter. But I can’t find a way to specify tag and for built images I always see ‘latest’ tag.

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.