kopia lustrzana https://github.com/jupyterhub/repo2docker
Change location & type of fix
The initial plan was to modify our copy of the environment variables as set via cli argparsing at the point-of-use. However, that function's purpose is to launch a container. Adding argument processing doesn't feel right. The new plan is to modify our copy of the environment when the arguments are parsed. `argparse` provides a hook to do such work: custom actions.pull/874/head
rodzic
af5d9c7129
commit
2c9027eb80
|
@ -158,6 +158,10 @@ def get_argparser():
|
|||
"--user-name", help="Username of the primary user in the image"
|
||||
)
|
||||
|
||||
# Process the environment options the same way that docker does, as
|
||||
# they are passed directly to docker as the environment to use. This
|
||||
# requires a custom action for argparse.
|
||||
# see https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file
|
||||
argparser.add_argument(
|
||||
"--env",
|
||||
"-e",
|
||||
|
|
|
@ -560,8 +560,6 @@ class Repo2Docker(Application):
|
|||
"mode": "rw",
|
||||
}
|
||||
|
||||
# self.environment needs to be modified to match the semantics
|
||||
# of docker's --env option
|
||||
run_kwargs = dict(
|
||||
publish_all_ports=self.all_ports,
|
||||
ports=ports,
|
||||
|
|
Ładowanie…
Reference in New Issue