Skip to content

Instantly share code, notes, and snippets.

@MaxySpark
Created September 2, 2019 11:10
Show Gist options
  • Save MaxySpark/f03c96f200b911b6507ba5f4be873e3a to your computer and use it in GitHub Desktop.
Save MaxySpark/f03c96f200b911b6507ba5f4be873e3a to your computer and use it in GitHub Desktop.
Docker Commands
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