Skip to content

FrancisArgnR/How-Install-And-Use-Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 

Repository files navigation

How to install and use Docker?

INSTALL DOCKER

Under construction

...

Check the installation

$ docker info

$ docker run hello-world

Show docker subcommand

$ docker

Help with subcommand

$ docker docker subcommand --help

DOCKER IMAGES

Looking for images in Docker Hub

$ docker search image

Download docker's image

$ docker pull image

List the images downloaded

$ docker images

Remove an image

$ docker rm image

DOCKER CONTAINER

Execute docker container

$ docker run -it image

  • t: launch console

Status of containers in execution

$ docker ps

Stop a container

$ docker stop image or containerID

Restart a container

$ docker restart image or containerID

Remove the image of a container in execution

$ docker rm --force image or containerID

Copy files from host to Docker container

$ docker cp file in host image or containerID:/path and name in container

Example: docker cp abc.txt my-alpine:/tmp/bcd.txt

Copy files Docker container to host

$ docker cp image or containerID:/path and name in container file in host

Example: docker cp my-alpine:/root/data/xyz.txt /tmp/xyz.txt

INSIDE CONTAINER

Leave the container

$ exit

REFERENCES

https://github.com/manuparra/MasterDegreeCC_Practice/blob/master/starting_docker.md
https://zeroturnaround.com/rebellabs/docker-commands-and-best-practices-cheat-sheet/
https://howtoprogram.xyz/2017/02/25/copy-files-host-docker-container-vice-versa/
https://www.digitalocean.com/community/tutorials/como-instalar-y-usar-docker-en-ubuntu-16-04-es

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published