Text of forums.docker.com › t › automating-docker-compose-with-github › 103372 as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Automating docker-compose with Github - Compose - Docker Community Forums

Automating docker-compose with Github Docker Engine Compose automatedbuilds , docker ademkikaj January 22, 2021, 11:48am 1 I have recently set up an automated build repository by connecting my docker account with GitHub. I have made some small examples with a single Dockerfile in the project. I have just a simple HTML file where I just print a paragraph, running it on NGINX. The Dockerfile looks as below: FROM nginx:latest LABEL maintainer="JohnDoe" \ name="DemoWebGit" \ version="1.0" ENV CONTAINER_HOME=/usr/share/nginx/html WORKDIR $CONTAINER_HOME ADD /myweb $CONTAINER_HOME This works as I expected.

Every time I push some code, the latest docker image is also built. If I have a release with a specific version, it works with the specific tag as I have configured it. Now, I am trying to build a Flask based app which runs with gunicorn and NGINX. The NGINX flask depends on my Flask application. Thus, I had to fix this through the docker-compose feature. The docker-compose file looks as below: services: nginx: image: nginx:latest container_name: nginx volumes: - ./default.conf:/etc/nginx/conf.d/default.conf ports: - 80:80 networks: - mynetwork depends_on: - myflaskapp myflaskapp: build: ./dockerfiles/Dockerfile container_name: myflaskapp command: gunicorn --bind 0.0.0.0:8000 "myflaskapp:get_app()" ports: - 8000:80 volumes: - ./:/var/www networks: mynetwork: aliases: - myflask-app networks: mynetwork: When I run docker-compose up this works just fine.

However, I am trying to automate this one, but it seems that it always looks for the Dockerfile within the project. Now that I have two containers running simultaneously, I do now know how this can build a single image? Is there any way to automate this process and similar to this one, i.e. Php and MySQL? Related topics Topic Replies Views Activity Build Multiple Dockerfiles in one GitHub Repo? Compose 1 7097 March 5, 2016 Adapting Compose file to use images pushed to Docker Hub or other repo Compose 0 673 June 22, 2021 Docker-compose: build image but uses another one Image Builds docker-compose 1 633 October 6, 2021 Docker Compose and Automated Builds Docker Hub ci_cd 0 680 September 21, 2019 Managing Automated Builds in a Multi-Container Repository Docker Hub automatedbuilds , ci_cd 0 1581 March 8, 2017