Tag Archives: docker usage

How to mount volume in docker container

Docker run use -v bind mount a volume. You can also modify the docker hostconfig.json and config.v2.json configuration files to mount volumes to existing docker containers. Continue reading

Posted in How to | Tagged , , | 1 Comment

How to map the docker container network port to the host port

When running the docker container, you can use -p for port mapping. This article describes running a new container mapping port and mapping an existing container port. Continue reading

Posted in How to | Tagged , , | Comments Off on How to map the docker container network port to the host port

How to set docker container host name

When we start a new container, the default host name is the container’s id. This host name is not only easy to remember, but also inconvenient to use in production environments. We can use the following options to specify the … Continue reading

Posted in How to | Tagged , , | Comments Off on How to set docker container host name

How to rename the docker container name

In the previous article, we introduced how to rename the docker image name.  This article will show you how to rename the docker container. List docker images Running docker image u-lnmp List docker containers The container name just started is … Continue reading

Posted in How to | Tagged , , | Comments Off on How to rename the docker container name

How to rename the docker image name

Docker image rename,
docker tag: Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE;
docker rmi: remove the SOURCE_IMAGE image. Continue reading

Posted in How to | Tagged , , | Comments Off on How to rename the docker image name

How to stop / remove all containers of docker

How to stop/remove all containers of docker? View all container IDs:~ docker ps -a -q ; Stop all containers:~ docker stop $(docker ps -a -q); Remove all containers:~ docker rm $(docker ps -a -q) Continue reading

Posted in How to | Tagged , | Comments Off on How to stop / remove all containers of docker

How to run Ubuntu system in docker

How to use docker to run the system? This article shares with you examples of searching image, starting image and building container, starting container, closing container, etc. Continue reading

Posted in How to | Tagged , | Comments Off on How to run Ubuntu system in docker