Skip to content

eric271110/Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Docker practice

Purpose

Try make Dockerfile to excute shell script, and need to use container.

Dockerfile Command

FROM -> Set the basic image

COPY ->Copy file to path which container assigned, and container can read this file.

RUN ->When build image, run command

CMD ->When build container, run command.

Docker Command

docker build -t NameAndOptionalTag . ->build image

docker run ImageNameAndOptionalTag ->run new command in new container.

docker images ->print images

docker ps –a ->print all container

docker rmi --force ImageNameAndOptionalTag -> remove image

docker rm container_id_or_name ->remove comtainer

docker start CONTAINER ID ->start container

docker restart CONTAINER ID ->restart container

docker stop CONTAINER ID ->stop container

docker update CONTAINER ID ->update container parameter

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published