Skip to content

Commit ea6bfff

Browse files
zsnmwyrubenfiszel
andauthored
doc: Remote Docker Daemon (windmill-labs#299)
* doc: Remote Docker Daemon * Update index.md --------- Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
1 parent dc6466e commit ea6bfff

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

docs/advanced/7_docker/index.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,29 @@ On the docker-compose, it is enough to uncomment the volume mount of the windmil
1717

1818
In the charts values of our [helm charts](https://github.com/windmill-labs/windmill-helm-charts), set `windmill.exposeHostDocker` to `true`
1919

20+
### Remote Docker Daemon
21+
22+
One possibility to use the docker daemon wiht k8s with containerd is to run a docker daemon in the same pod using "Docker-in-Docker" ( dind) Using the official image `docker:stable-dind`:
23+
24+
Here an example of a dind template to be adapted:
25+
26+
```yaml
27+
apiVersion: v1
28+
kind: Pod
29+
metadata:
30+
name: dind
31+
spec:
32+
containers:
33+
- name: dind
34+
image: 'docker:stable-dind'
35+
command:
36+
- dockerd
37+
- --host=tcp://0.0.0.0:8000
38+
securityContext:
39+
privileged: true
40+
```
41+
42+
2043
## Use
2144
2245
The default code is as follows:
@@ -56,3 +79,34 @@ As a flow step:
5679
![flow step 1](./as_flow.png.webp)
5780

5881
![flow step 2](./as_flow2.png.webp)
82+
83+
## Use with Remote Docker Daemon
84+
85+
```bash
86+
#!/bin/bash
87+
88+
set -ex
89+
90+
# The Remote Docker Daemon Address -> 100.64.2.97:8000
91+
# In the example, 100.64.2.97 is my pod address.
92+
93+
DOCKER="docker -H 100.64.2.97:8000"
94+
$DOCKER run --rm alpine /bin/echo "Hello $msg"
95+
```
96+
97+
output
98+
99+
```log
100+
+ DOCKER='docker -H 100.64.2.97:8000'
101+
+ docker -H 100.64.2.97:8000 run --rm alpine /bin/echo 'Hello '
102+
Unable to find image 'alpine:latest' locally
103+
latest: Pulling from library/alpine
104+
7264a8db6415: Pulling fs layer
105+
7264a8db6415: Verifying Checksum
106+
7264a8db6415: Download complete
107+
7264a8db6415: Pull complete
108+
Digest: sha256:7144f7bab3d4c2648d7e59409f15ec52a18006a128c733fcff20d3a4a54ba44a
109+
Status: Downloaded newer image for alpine:latest
110+
Hello
111+
+ exit 0
112+
```

0 commit comments

Comments
 (0)