mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-11 06:20:08 -05:00
cmd/hi: fixes and qol (#2649)
This commit is contained in:
@@ -126,3 +126,24 @@ func CleanImagesInCI(pool *dockertest.Pool) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// DockerRestartPolicy sets the restart policy for containers.
|
||||
func DockerRestartPolicy(config *docker.HostConfig) {
|
||||
config.RestartPolicy = docker.RestartPolicy{
|
||||
Name: "unless-stopped",
|
||||
}
|
||||
}
|
||||
|
||||
// DockerAllowLocalIPv6 allows IPv6 traffic within the container.
|
||||
func DockerAllowLocalIPv6(config *docker.HostConfig) {
|
||||
config.NetworkMode = "default"
|
||||
config.Sysctls = map[string]string{
|
||||
"net.ipv6.conf.all.disable_ipv6": "0",
|
||||
}
|
||||
}
|
||||
|
||||
// DockerAllowNetworkAdministration gives the container network administration capabilities.
|
||||
func DockerAllowNetworkAdministration(config *docker.HostConfig) {
|
||||
config.CapAdd = append(config.CapAdd, "NET_ADMIN")
|
||||
config.Privileged = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user