« Installing Mate Desktop on Centos 8 without compilingHP Stream weak wifi with Linux »

My Docker cheat sheet


  12:46:00 pm by wdawe, Categories: General

A worthwhile read on why you should not be running sshd in your container https://jpetazzo.github.io/2014/06/23/docker-ssh-considered-evil/
Difference between RUN, CMD and ENTRYPOINT http://goinbigdata.com/docker-run-vs-cmd-vs-entrypoint/

Remove stopped containers: docker container prune
Run with volume mapping: docker run -v /outside_path7:/inside_path image_name ( add /bin/bash at the end to override the Dockerfile and add -it )
List all containers: docker container ls -all
List images: docker images
Remove image: docker rmi image_name
Export image as tarfile: docker save -o tarfile.tar image_name
Load exported image: docker load -i image.tar (This command works much better than import as it creates a container as part of the loading)
Update image with changes: docker commit container_name image_name
Update image with Dockerfile: docker build -t image_name .


FROM image_name
USER run_as_user
WORKDIR /home/user/directory
CMD run_this_command

No feedback yet

Form is loading...

Cool web tools, EEPC tips and Linux info. Browse around, I'm sure you will find something to interest you.


  XML Feeds