Last active
January 25, 2017 22:04
-
-
Save safizn/1758f26dbeadc3cac43c39d9f9167f10 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# DOCKER-COMPOSER | |
#installation | |
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-14-04 | |
# https://docs.docker.com/compose/reference/overview/ | |
docker-compose build -f X | |
docker-compose -f app.dockercompose.yaml build | |
# Build and run all services/containers in the docker-compose file. | |
docker-compose up | |
docker-compose -f app.dockercompose.yaml up -d | |
# run only one container: | |
docker-compose -f docker-compose.yml run -it <nameOfServiceInTheFile> | |
# Build compose | |
docker-compose -f ./setup/<docker-compose>.yml build <service> | |
# exit container bash shell using CTRL + P + Q | |
# check running composed containers | |
docker-compose ps | |
docker-compose logs | |
# list services by docker-compose file. | |
docker-compose -f <file> ps | |
# removes all services run by the docker-compose file. | |
docker-compose -f <file> down | |
# If run into any problems can use no cache option | |
--no-cache |
This file contains hidden or 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
# docker-compose | |
network-mode: host | |
# CMD | |
command: bash -c "sleep 100000" | |
# will be overridden by entrypoint. | |
# command: bash -c "tail -F -n0 /etc/hosts" | |
# use /bin/sh where bash is not installed (i.e. alpine-node image). Installed bash to the default image. | |
# command: bash -c "" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment