Closed shoenig closed 1 year ago
Spot check,
job file
job "sleep" {
group "group" {
count = 1
task "sleep" {
driver = "podman"
config {
image = "docker.io/bash:5"
args = ["sleep", "infinity"]
extra_hosts = ["test4.localhost:127.0.0.2", "test6.localhost:[::1]"]
}
resources {
cores = 2
memory = 64
}
}
}
}
exec into the container and cat /etc/hosts
, see our extra hosts got added
➜ noamd alloc exec 28 /bin/sh
/ # cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 diablo
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.2 test4.localhost
[::1] test6.localhost
10.88.0.53 581de9968e4c sleep-28c28dd8-62e5-dfbc-6411-54101a77c90e
10.88.0.1 host.containers.internal
This PR adds support for setting extra_hosts on in podman task configuration, bringing the podman driver support up to par with the docker driver.
Closes #244