Tag: docker compose

[pacemaker]Docker compose autostart

Does someone have an example how to realize that Pacemaker runs docker-compose for starting a specific container? i want to archive to start and stop container as active/passive setup on 2 Hosts.

Merge container files when using docker-sync

I am using docker-sync to speed up the dev environment file updates on my node.js application. Right now I am trying to cache npm install command by moving package.json to the image and running npm install when the image is created. Dockerfile: ADD ./package.json /app/user/ RUN npm install Then I use the following configuration for […]

Service 'web' failed to build: lstat apache/sites-enabled/000-default.conf: no such file or directory

I want to # Update the default apache site with the config we created. COPY ./apache/sites-enabled/000-default.conf /etc/apache2/sites-enabled/000-default.conf I know my 000-default.conf is not in the same directory as Dockerfile that is why I want to hit it like this ./apache/… but I still got the error. Structure: dockerizing-django ├── apache │   └── sites-enabled │   └── […]

Open a WebSocket connexion from a docker container to another (able to ping container in cli but not via ws)

I’m using docker-compose to run 2 containers, 1 for running a react application and another to run a rabbitmq server. version: ‘2’ services: node.app.local: build: context: ./node container_name: app-node hostname: node.app domainname: local tty: true volumes: – “${SOURCES_PATH}/app:/var/www/app” ports: – 8091:8091 expose: – 8091 links: – rabbitmq.app.local working_dir: “/var/www/app” rabbitmq.app.local: image: rabbitmq:3.6.10 container_name: app-rabbitmq hostname: […]

How to access private GitHub repositories in docker-compose?

This is my docker-compose.yml file: version: ‘2.1’ services: users-db: container_name: users-db build: git@github.com:lukalopusina/flask-microservices-users.git#master:project/db volumes: – ‘~/.ssh/github:/root/.ssh/id_rsa’ ports: – 5435:5432 # expose ports – HOST:CONTAINER environment: – POSTGRES_USER=postgres – POSTGRES_PASSWORD=postgres healthcheck: test: exit 0 This is Dockerfile: FROM postgres # Disable checking for known_hosts (maybe not working) RUN mkdir /root/.ssh && echo “StrictHostKeyChecking no ” > […]

Clashing between two postgres database though having two different docker-compose yaml files for django projects

I am running two different django projects in my machine. My machine is running on os –ubuntu 16.04. I am very new to docker. As far as I know, the only way to differentiate between two projects setup is defining different containers. To have different containers, I have given different container_name in my docker-compose.yml file. […]

Linking container with docker-compose

I try to run an instance with 2 containers, 1 container with mysql and other with node. In docker-compose.yml file: api: build: ./server ports: – 8001:8001 links: – mysql:mysql mysql: image: mysql environment: MYSQL_DATABASE: ghostDB MYSQL_ROOT_PASSWORD: root volumes: – /data/mysql:/var/lib/mysql Dockerfile of server/: FROM node:0.12 ENV PORT 8001 ENV MYSQL_DATABASE ghostDB ENV MYSQL_USER root ENV […]

Docker Anonymous Voumes

I’ve seen Docker volume definitions in docker-compose.yml files like so: -v /path/on/host/modules:/var/www/html/modules I noticed that Drupal’s official image, their docker-compose.yml file is using anonymous volumes. Notice the comments: volumes: – /var/www/html/modules – /var/www/html/profiles – /var/www/html/themes # this takes advantage of the feature in Docker that a new anonymous # volume (which is what we’re creating […]

Edit default .htaccess in wordpress docker

I have a wordpress container which gets generated by a docker-compose file. WordPress container contains .htaccess file by default. I want to edit that such that that the edit is performed only once when container is created.

How to import configurations to dockerfile.

I have a docker-compose.yaml file and then dockerfiles. Now, I don’t want to write all the host, port, password in this docker-compose/dockerfile. Rather, I would like to keep all these configurations in a different file. I know, half of the requirement could be achieved by using .env file, where I can keep my environment variables, […]

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