From 3b21a6b60eed6fb83ce7eb946b27f375f5bc7dcc Mon Sep 17 00:00:00 2001 From: ShareVB Date: Sun, 11 May 2025 17:24:12 +0200 Subject: [PATCH] fix(Docker Cheatsheet): typo <> in code blocks Fix #66 --- src/tools/docker-memo/docker.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/tools/docker-memo/docker.md b/src/tools/docker-memo/docker.md index 9e450cbd..e03f74e5 100644 --- a/src/tools/docker-memo/docker.md +++ b/src/tools/docker-memo/docker.md @@ -19,13 +19,13 @@ Docker images are a lightweight, standalone, executable package of software that Build an Image from a Dockerfile ```bash -docker build -t <image_name> . +docker build -t . ``` Build an Image from a Dockerfile without the cache ```bash -docker build -t <image\_name> . -no-cache +docker build -t . -no-cache ``` List local images @@ -37,7 +37,7 @@ docker images Delete an Image ```bash -docker rmi <image\_name> +docker rmi ``` Remove all unused images @@ -53,25 +53,25 @@ Docker Hub is a service provided by Docker for finding and sharing container ima Login into Docker ```bash -docker login -u <username> +docker login -u ``` Publish an image to Docker Hub ```bash -docker push <username>/<image\_name> +docker push / ``` Search Hub for an image ```bash -docker search <image\_name> +docker search ``` Pull an image from a Docker Hub ```bash -docker pull <image\_name> +docker pull ``` Start the docker daemon @@ -99,49 +99,49 @@ A container is a runtime instance of a docker image. A container will always run Create and run a container from an image, with a custom name: ```bash -docker run --name <container\_name> <image\_name> +docker run --name ``` Run a container with and publish a container's port(s) to the host. ```bash -docker run -p <host\_port>:<container\_port> <image\_name> +docker run -p : ``` Run a container in the background ```bash -docker run -d <image\_name> +docker run -d ``` Start or stop an existing container: ```bash -docker start|stop <container\_name> (or <container-id>) +docker start|stop (or ) ``` Remove a stopped container: ```bash -docker rm <container\_name> +docker rm ``` Open a shell inside a running container: ```bash -docker exec -it <container\_name> sh +docker exec -it sh ``` Fetch and follow the logs of a container: ```bash -docker logs -f <container\_name> +docker logs -f ``` To inspect a running container: ```bash -docker inspect <container\_name> (or <container\_id>) +docker inspect (or ) ``` To list currently running containers: