Commit b1ecc0b
authored
verify_exercises_in_docker: allow using podman (#2142)
Podman is a container runtime with several advantages over docker:
- It's fully open-source. Beyond the ethics, that comes with practical
benefts. For example, more Linux distributions carry Podman in their
official package repositories. The installation of Docker, on the other
hand, can be a pain.
- It's designed to run in rootless mode. That means "sudo" is not
required to run this test script. Actually, the test script doesn't use
sudo, because it assumes that people add themselves to the docker group,
allowing themselves to use the docker command without sudo. This is a
privilege escalation vulnerability: An attacker who gains RCE with that
user can easily upgrade to root privileges via docker. Exercism
contributors should not be required to lower their system's security to
contribute.
There are slight incompatibilities, which are addressed:
- The bind mounts require the "Z" option to permit the container access
to these directories on systems using SELinux, like Fedora.
- Podman maps user IDs to a separate namespace per container. In order
to keep the mounted directories owned and writable by the normal local
user, this mapping is suppressed with the `--userns=keep-id` option.1 parent 334c0b2 commit b1ecc0b
1 file changed
Lines changed: 18 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
24 | 37 | | |
25 | 38 | | |
26 | 39 | | |
| |||
45 | 58 | | |
46 | 59 | | |
47 | 60 | | |
48 | | - | |
49 | | - | |
| 61 | + | |
| 62 | + | |
50 | 63 | | |
| 64 | + | |
51 | 65 | | |
52 | 66 | | |
53 | 67 | | |
| |||
99 | 113 | | |
100 | 114 | | |
101 | 115 | | |
102 | | - | |
| 116 | + | |
103 | 117 | | |
104 | 118 | | |
105 | 119 | | |
| |||
0 commit comments