Skip to content

Commit db8cc8f

Browse files
authored
Fix tecnativa ref & update sample compose
Signed-off-by: Adam <[email protected]>
1 parent dd2d727 commit db8cc8f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@ If adding multiple mods, enter them in an array separated by `|`, such as `DOCKE
1212

1313
Mapping `docker.sock` is a potential security liability because docker has root access on the host and any process that has full access to `docker.sock` would also have root access on the host. Docker api has no built-in way to set limitations on access, however you can use a proxy for the `docker.sock` via a solution like [our docker socket proxy](https://github.com/linuxserver/docker-socket-proxy), which adds the ability to limit access. Then you would just set `DOCKER_HOST=` environment variable to point to the proxy address.
1414

15-
Here's a sample compose yaml snippet for tecnativa/docker-socket-proxy:
15+
Here's a sample compose yaml snippet for the socket proxy:
1616
```yaml
1717
dockerproxy:
1818
image: lscr.io/linuxserver/socket-proxy:latest
1919
container_name: dockerproxy
20-
volumes:
21-
- /var/run/docker.sock:/var/run/docker.sock:ro
22-
restart: unless-stopped
2320
environment:
2421
- CONTAINERS=1
2522
- POST=0
23+
volumes:
24+
- /var/run/docker.sock:/var/run/docker.sock:ro
25+
restart: unless-stopped
26+
read_only: true
27+
tmpfs:
28+
- /run
2629
```
27-
The above config for instance would allow read only access to the docker api. Then the env var in the container with the docker mod can be set as `DOCKER_HOST=dockerproxy`. This will allow the container to retrieve info on other containers, but it won't be allowed to spin up new containers. With the proxy, you can fine tune the permissions very easily.
30+
The above config for instance would allow read only access to list containers via the docker api. Then the env var in the container with the docker mod can be set as `DOCKER_HOST=dockerproxy`. This will allow the container to retrieve info on other containers, but it won't be allowed to spin up new containers. With the proxy, you can fine tune the permissions very easily.

0 commit comments

Comments
 (0)