Created
September 2, 2019 11:10
-
-
Save MaxySpark/f03c96f200b911b6507ba5f4be873e3a to your computer and use it in GitHub Desktop.
Docker Commands
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
docker run hello-world | |
docker run busy box echo hello world | |
docker ps | |
docker ps --all | |
docker start id_from_ps | |
docker start -a id_from_ps | |
docker stop id | |
docker kill id | |
docker run = docker create + docker start | |
docker system prune | |
docker logs id | |
docker exec -it id command | |
docker exec -it id sh | |
------------------- | |
Dockerfile | |
------------------- | |
FROM alpine | |
RUN apk add --update redis | |
CMD ["redis-server"] | |
------------------- | |
docker build . | |
docker build -t maxyspark:project_name:version . | |
docker commit -c 'CMD ["redis-server"]' id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment