Tag: docker compose

container exit with code 0 while using docker compose file

I have a dockerfile to install httpd. When i run this dockerfile using the command docker run -dit /bin/bash, the container is started and it is running in the background. when i perform docker ps i could see the container running. I have created a docker-compose.yml file as below, version: ‘2’ services: web: build: context: […]

Why is bin/sh not found on my alpine based docker-compose build?

I am building a docker stack based on alpine. Given my: php7-dockerfile: FROM php:7-fpm-alpine RUN apk update && \\ apk upgrade && \\ apk add –update autoconf gcc and docker-compose.yml: version: “2” services: php: build: context: . dockerfile: php7-dockerfile container_name: test_php volumes_from: – data On running docker-compose build I am getting: Building data Step 1 […]

Docker volumes mounting on Windows 8 is not working

Context I want to run a Docker Compose application on a Windows 8. I made it under a Ubuntu 16.04 and it’s perfectly working on it. This Docker Compose run: nginx php-fpm The two containers use volumes. Files My .env file: COMPOSE_CONVERT_WINDOWS_PATHS=1 APPLICATION_PATH=//C/Users/my_user/Documents/Development/my_application My docker-compose.yml file: version: ‘2’ services: web: build: ../application-web/ ports: – “80:80” […]

Docker link container

Im am using docker compose to run 2 containers (both centos based). This is my yml: front: build: front/docker/java ports: – “8080:8080” links: – back:db back: build: back/docker/java ports: – “8081:8081” But the front container gets nothing in the /etc/hosts for or env vars to be able to connect to the back container. I am […]

Concourse CI and custom docker-compose

I try to start Concourse CI with custom docker-compose version: ‘2’ services: concourse-web: image: concourse/concourse container_name: concourse-web command: web network_mode: host volumes: [“./keys/web:/concourse-keys”] environment: CONCOURSE_BASIC_AUTH_USERNAME: concourse CONCOURSE_BASIC_AUTH_PASSWORD: changeme CONCOURSE_EXTERNAL_URL: http://my.internal.ip:8092 CONCOURSE_BIND_PORT: 8092 CONCOURSE_POSTGRES_DATA_SOURCE: |- postgres://odoo:odoo@localhost:5432/concourse?sslmode=disable concourse-worker: image: concourse/concourse container_name: concourse-worker network_mode: host privileged: true command: worker volumes: [“./keys/worker:/concourse-keys”] environment: CONCOURSE_BIND_PORT: 8092 And worker can’t connect […]

docker-compose startup error cannot import name _thread

For all the good fellars out there who’re trying to get started on docker-compose. I’m running OS X El Capitan (10.11). The system ships with python 2.7. Trying to replace the system python to python 3 isn’t recommended because many core systems depend on python 2 libraries. Installed ‘Docker’ for Mac and ‘docker-compose’ using docker […]

Changing tomcat port in Dockerfile

I am creating a Docker image using dockerfile build, where my base image is Tomcat 8.0:jre8. Now in the dockerfile I want to specify a custom port instead of 8080 and expose a custom port outside the docker container. Can anyone guide me how this can be done?

Mysql in a separate container or in the same [closed]

So, I am buildin a docker container for a django app and after reading a decent amount on the internet I found out that I can either include in docker-compose.yml an already made image for Mysql or I can include it in the container of the app. I was wondering what are the positive sides […]

How could I launch multiple container at a time shared one Dockerfile

I want to launch hundreds of container with one command. Container A will change directory to a then run a.rb when it is launched Container B will change directory to b then run b.rb when it is launched Container … will change directory to … then run ….rb when it is launched All of those […]

docker-machine – connection refused error

I’m using docker-machine, docker-compose on mac OS to start up my container. In my docker-compose.yml, i have ports: – “8080:8080” expose: – “3000” – “8000” – “8080” Steps to create docker-machine docker-machine create testdocker –driver=virtualbox eval “$(docker-machine env testdocker)” docker-compose up -d (all containers start up properly) docker-machine ip localdocker open echo ${DOCKER_HOST_IP} […]

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