Last active
January 7, 2019 08:10
-
-
Save ssatz/81b734713066f8fc05d5187de3853022 to your computer and use it in GitHub Desktop.
Docker command
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
# Command Description | |
docker ps #List containers | |
docker pull #Pull an image or a repository from a registry | |
docker push # Push an image or a repository to a registry | |
docker rename #Rename a container | |
docker system prune # prune This will remove: | |
# - all stopped containers | |
# - all volumes not used by at least one container | |
# - all networks not used by at least one container | |
# - all images without at least one container associated to them | |
# recreate only 2 services | |
$ docker-compose up -d --no-deps SERVICE1 SERVICE2 | |
#create a external network | |
docker network create nginx-proxy | |
#docker-compoer | |
docker-compose up -d | |
#docker stop and remove | |
docker container stop $(docker container ls -a -q) && docker system prune -a -f --volumes | |
docker-compose down --rmi all | |
#docker Interative command | |
docker-compose exec redis sh | |
docker-compose exec web sh |
to resolve redis memory allocate issue run on the host system
sysctl vm.overcommit_memory=1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker network ls
docker network connect <network_name> <container_name>
docker inspect <network_name>