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

My Docker cheat sheet

01/23/19

  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 .

Dockerfile

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

No feedback yet


Form is loading...

October 2025
Mon Tue Wed Thu Fri Sat Sun
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
 << <   > >>

Wayne D's Blog

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

Search

Random photo

Cinelerra Error Messages When Using YUV4MPEGSTREAM Rendering Option

  XML Feeds

b2