Commit a0cd44b
Juraj Virgovič
feat: rootless docker container (#893)
As per [OWASP's Docker Security Cheat
Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html),
it is recommended to set a user instead of running the container as
root.
```bash
virgo@lenovo:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ee568549229f cyclonedx-py:latest "/bin/bash" About a minute ago Up About a minute nifty_swirles
virgo@lenovo:~$ docker exec -it ee568549229f sh -c "id"
uid=1000(cyclonedx) gid=1000(cyclonedx) groups=1000(cyclonedx)
```
:arrow_up: Now the container is running as a standard user.
Signed-off-by: virgo-o <[email protected]>1 parent fcc1d75 commit a0cd44b
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| 25 | + | |
22 | 26 | | |
0 commit comments