mirror of
https://github.com/phusion/baseimage-docker.git
synced 2026-11-20 09:21:17 +00:00
Added a workaround for Docker's inability to modify /etc/hosts in the container.
See Docker bug 2267: https://github.com/dotcloud/docker/issues/2267
This commit is contained in:
1 parent
291b9aae02
commit
1f38e2226e
5 files changed
+39
-2
No files matched your search
@@ -56,6 +56,9 @@ def is_exe(path):
|
||||
except OSError:
|
||||
return False
|
||||
|
||||
def create_hosts_file():
|
||||
run_command_killable("/bin/cp", "/etc/hosts", "/etc/workaround-docker-2267/")
|
||||
|
||||
def import_envvars(clear_existing_environment = True, override_existing_environment = True):
|
||||
new_env = {}
|
||||
for envfile in listdir("/etc/container_environment"):
|
||||
@@ -249,6 +252,7 @@ def install_insecure_key():
|
||||
run_command_killable("/usr/sbin/enable_insecure_key")
|
||||
|
||||
def main(args):
|
||||
create_hosts_file()
|
||||
import_envvars(False, False)
|
||||
export_envvars()
|
||||
|
||||
|
||||
Reference in new issue
Block a user