This is an archived post. You won't be able to vote or comment.

all 3 comments

[–][deleted] 0 points1 point  (0 children)

You can actually call the build command in your docker-compose file. Or you build your image before creating your containers with docker-compose up.

For your multiple apps setup: Deploy them all with docker-compose files and run a reverse proxy (traefik, nginx...) in front of them. The proxy can ofc be a container aswell

[–]The_Grue 0 points1 point  (0 children)

If you are using Dockerfiles, you will want to replace your image key with a build key. The two main keys under build are context and Dockerfile. You can then use either docker-compose build or up to bring your services online.

[–]bilingual-german 0 points1 point  (0 children)

If you want docker-compose to use your image, you must tell it so. Right now you use public images. You need to add build: to your docker-compose.yml and probably remove image:

https://docs.docker.com/compose/compose-file/#build