You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Having tools in a container might sometimes be useful for different debugging. Just exec into it and start the diagnostics. With a distroless/minimized image, it's not that easy. What we can do instead is attach a sidecar container:
3
+
>
4
+
```sh
5
+
docker run \
6
+
--rm \
7
+
-it \
8
+
--pid=container:<container id> \
9
+
--net=container:<container id> \
10
+
--cap-add sys_admin \
11
+
alpine \
12
+
sh
13
+
```
14
+
15
+
16
+
from: [Minimal containers using Nix](https://tmp.bearblog.dev/minimal-containers-using-nix/)
17
+
18
+
19
+
20
+
This starts an Alpine container that attaches to the same PID and network namespaces, giving you visibility into what's running inside the original container.
21
+
22
+
23
+
To make this easier, you can define a Bash function:
0 commit comments