Skip to content

Commit a737564

Browse files
committed
➕ Add docker architecture diagrams
1 parent 16fdb17 commit a737564

File tree

7 files changed

+22
-2
lines changed

7 files changed

+22
-2
lines changed

.vitepress/theme/styles.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ aside.VPSidebar,
2525
text-align: justify;
2626
}
2727

28+
.vp-doc p img {
29+
margin: 0 auto;
30+
}
31+
2832
.vp-doc .custom-block {
2933
margin: 3em;
3034
}
137 KB
Loading

docs/public/docker/dind.png

113 KB
Loading

docs/public/docker/host-mount.png

63.8 KB
Loading

docs/public/docker/ssh.png

62.5 KB
Loading

docs/public/docker/tcp.png

62.4 KB
Loading

docs/tools/docker.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ You can read more about this topic by running a simple Google search for
1616
[`"run docker in docker"`](https://www.google.com/search?q=run+docker+in+docker).
1717
:::
1818

19+
Throughout this page, we will refer to the diagram below which illustrates the basic
20+
Docker architecture.
21+
The subsequent sections might present a partial perspective of the complete architecture.
22+
23+
![Docker architecture](/docker/architecture.png)
24+
1925
## Docker In Docker
2026

2127
Docker In Docker *(also known as dind)* allows developers to run a Docker container within
@@ -45,6 +51,8 @@ docker run \
4551

4652
### 2. Mounting the Docker Socket From the Host
4753

54+
![Host mount](/docker/host-mount.png)
55+
4856
```sh{2}
4957
docker run \
5058
-v /var/run/docker.sock:/var/run/docker.sock:ro \
@@ -53,6 +61,8 @@ docker run \
5361

5462
### 3. Connect to a Remote Host *(TCP)*
5563

64+
![TCP](/docker/tcp.png)
65+
5666
Assuming you have access to a remote host running docker, you can set the value of
5767
`DOCKER_HOST` as follows:
5868

@@ -67,6 +77,8 @@ pregenerated key-pairs.
6777

6878
### 4. Connect to a Remote Host *(SSH)*
6979

80+
![SSH](/docker/ssh.png)
81+
7082
Assuming you have SSH access to a [remote host running docker][protect-ssh], you can set
7183
the value of `DOCKER_HOST` as follows:
7284

@@ -80,7 +92,9 @@ This method is optimized by the workspace as we internally configure a persisten
8092
`ssh-agent` behind the scenes for a quicker connection experience.
8193
For more information, visit our documentation on [`ssh`](/tools/ssh)
8294

83-
### 5. Use [`docker:dind`][] Running on a Remote Host
95+
### 5. Use [`docker:dind`][dind] Running on a Remote Host
96+
97+
![DIND](/docker/dind.png)
8498

8599
This process is split into 3 steps:
86100

@@ -98,6 +112,7 @@ This process is split into 3 steps:
98112
--privileged \
99113
--name dind \
100114
--net dind \
115+
-v workspace:/workspace:ro \
101116
-e DOCKER_TLS_CERTDIR="" \
102117
docker:dind
103118
```
@@ -107,6 +122,7 @@ This process is split into 3 steps:
107122
```sh
108123
docker run \
109124
-e DOCKER_HOST=tcp://dind:2375 \
125+
-v workspace:/workspace \
110126
--net dind \
111127
ghcr.io/kloudkit/workspace:latest
112128
```
@@ -132,6 +148,6 @@ docker run \
132148
ghcr.io/kloudkit/workspace:latest
133149
```
134150

135-
[`docker:dind`]: https://hub.docker.com/_/docker/tags?page=1&name=dind
151+
[dind]: https://hub.docker.com/_/docker/tags?page=1&name=dind
136152
[protect-tls]: https://docs.docker.com/engine/security/protect-access/#use-tls-https-to-protect-the-docker-daemon-socket
137153
[protect-ssh]: https://docs.docker.com/engine/security/protect-access/#use-ssh-to-protect-the-docker-daemon-socket

0 commit comments

Comments
 (0)