Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
TEACHING-MATERIALS/exercises/13_docker/docker/docker-compose.yml
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
16 lines (15 sloc)
542 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the name of the container will be app_api_1 | |
# this is based on the directory name plus the name here | |
api: | |
build: . | |
# build from a Dockerfile in the current directory (.) | |
ports: | |
- "80:8080" | |
# the external port 80 is mapped to the internal port 8080 | |
volumes: | |
- /home/docker:/home/data | |
# the /home/docker directory on the host is mapped to | |
# the /home/data directory in the container that we created | |
# in the Dockerfile. | |
# this means that any files saved to /home/ will be stored | |
# on the docker host. |