fix(Docker Cheatsheet): typo <> in code blocks

Fix #66
This commit is contained in:
ShareVB committed 2025-05-11 17:24:12 +02:00
1 parent 58e2fb39b7
commit 3b21a6b60e
1 file changed
+15 -15
+15 -15
View File
@@ -19,13 +19,13 @@ Docker images are a lightweight, standalone, executable package of software that
Build an Image from a Dockerfile Build an Image from a Dockerfile
```bash ```bash
docker build -t &lt;image_name&gt; . docker build -t <image_name> .
``` ```
Build an Image from a Dockerfile without the cache Build an Image from a Dockerfile without the cache
```bash ```bash
docker build -t &lt;image\_name&gt; . -no-cache docker build -t <image\_name> . -no-cache
``` ```
List local images List local images
@@ -37,7 +37,7 @@ docker images
Delete an Image Delete an Image
```bash ```bash
docker rmi &lt;image\_name&gt; docker rmi <image\_name>
``` ```
Remove all unused images 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 Login into Docker
```bash ```bash
docker login -u &lt;username&gt; docker login -u <username>
``` ```
Publish an image to Docker Hub Publish an image to Docker Hub
```bash ```bash
docker push &lt;username&gt;/&lt;image\_name&gt; docker push <username>/<image\_name>
``` ```
Search Hub for an image Search Hub for an image
```bash ```bash
docker search &lt;image\_name&gt; docker search <image\_name>
``` ```
Pull an image from a Docker Hub Pull an image from a Docker Hub
```bash ```bash
docker pull &lt;image\_name&gt; docker pull <image\_name>
``` ```
Start the docker daemon 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: Create and run a container from an image, with a custom name:
```bash ```bash
docker run --name &lt;container\_name&gt; &lt;image\_name&gt; docker run --name <container\_name> <image\_name>
``` ```
Run a container with and publish a container's port(s) to the host. Run a container with and publish a container's port(s) to the host.
```bash ```bash
docker run -p &lt;host\_port&gt;:&lt;container\_port&gt; &lt;image\_name&gt; docker run -p <host\_port>:<container\_port> <image\_name>
``` ```
Run a container in the background Run a container in the background
```bash ```bash
docker run -d &lt;image\_name&gt; docker run -d <image\_name>
``` ```
Start or stop an existing container: Start or stop an existing container:
```bash ```bash
docker start|stop &lt;container\_name&gt; (or &lt;container-id&gt;) docker start|stop <container\_name> (or <container-id>)
``` ```
Remove a stopped container: Remove a stopped container:
```bash ```bash
docker rm &lt;container\_name&gt; docker rm <container\_name>
``` ```
Open a shell inside a running container: Open a shell inside a running container:
```bash ```bash
docker exec -it &lt;container\_name&gt; sh docker exec -it <container\_name> sh
``` ```
Fetch and follow the logs of a container: Fetch and follow the logs of a container:
```bash ```bash
docker logs -f &lt;container\_name&gt; docker logs -f <container\_name>
``` ```
To inspect a running container: To inspect a running container:
```bash ```bash
docker inspect &lt;container\_name&gt; (or &lt;container\_id&gt;) docker inspect <container\_name> (or <container\_id>)
``` ```
To list currently running containers: To list currently running containers: