-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker 1.8 - no longer able to pass Spring config settings in env-file #16585
Comments
@vdemeester do you mind revert the regular expression you added to validate env variables in #13694? I don't think we should restrict the variable names that way. I think making sure there are no white spaces in the name is more than enough. |
@calavera ohh 😓 🙀 Yeah sounds ok to me 😉. I'll do it real quick 😝 I'm just wondering if we should remove it altogether or just make it less restrictive (like having . and few other chars…), WDYT ? |
Hum, after a little more thoughts, I'll ping @duglin @tianon to back me up a bit on the environment variables 😝. @calavera It's not possible to do something like
@rlwclawson according to the spring-boot documentation, the environment variable should not contain dot (
So now, I'm more balanced about reverting the change.. WDYT ? |
Yeah, POSIX is pretty clear that we're supposed to be tolerant of |
- Both docker (per moby/moby#16585) and Kubernetes (per kubernetes/kubernetes#2707) support passing environment variables with dots as config, despite dot not technically being supported in POSIX. This is necessary to be able to specify hocon array values like FOO.0, FOO.1, etc now that the Hocon library is updated to typesafe/config 1.4.1 via puppetlabs/typesafe-config 0.2.0 / clj-parent 4.6.11 /bin/sh will not add such variables to the environment, but /bin/bash will properly expose them, so that they may be consumed by puppetserver and hocon. NOTE: ElasticSearch is notorious for passing such values, and it also uses the tini init system, so it served as a good design to follow: https://github.com/elastic/elasticsearch/tree/master/distribution/docker
- Both docker (per moby/moby#16585) and Kubernetes (per kubernetes/kubernetes#2707) support passing environment variables with dots as config, despite dot not technically being supported in POSIX. This is necessary to be able to specify hocon array values like FOO.0, FOO.1, etc now that the Hocon library is updated to typesafe/config 1.4.1 via puppetlabs/typesafe-config 0.2.0 / clj-parent 4.6.11 /bin/sh will not add such variables to the environment, but /bin/bash will properly expose them, so that they may be consumed by puppetserver and hocon. NOTE: ElasticSearch is notorious for passing such values, and it also uses the tini init system, so it served as a good design to follow: https://github.com/elastic/elasticsearch/tree/master/distribution/docker
- Both docker (per moby/moby#16585) and Kubernetes (per kubernetes/kubernetes#2707) support passing environment variables with dots as config, despite dot not technically being supported in POSIX. This is necessary to be able to specify hocon array values like FOO.0, FOO.1, etc now that the Hocon library is updated to typesafe/config 1.4.1 via puppetlabs/typesafe-config 0.2.0 / clj-parent 4.6.11 /bin/sh will not add such variables to the environment, but /bin/bash will properly expose them, so that they may be consumed by puppetserver and hocon. NOTE: ElasticSearch is notorious for passing such values, and it also uses the tini init system, so it served as a good design to follow: https://github.com/elastic/elasticsearch/tree/master/distribution/docker
- Both docker (per moby/moby#16585) and Kubernetes (per kubernetes/kubernetes#2707) support passing environment variables with dots as config, despite dot not technically being supported in POSIX. This is necessary to be able to specify hocon array values like FOO.0, FOO.1, etc now that the Hocon library is updated to typesafe/config 1.4.1 via puppetlabs/typesafe-config 0.2.0 / clj-parent 4.6.11 /bin/sh will not add such variables to the environment, but /bin/bash will properly expose them, so that they may be consumed by puppetserver and hocon. NOTE: ElasticSearch is notorious for passing such values, and it also uses the tini init system, so it served as a good design to follow: https://github.com/elastic/elasticsearch/tree/master/distribution/docker
Problem Description
After upgrading from Docker 1.7.1 to 1.8 I'm unable to pass environment variables with "." or "-" via env-file. Most of our app is based on Spring and is built to use Spring "style" config settings (e.g. "messaging.rmq.broker.url").
Passing the same collection of settings on the command line via "-e" still works as before.
Actual results
Error message from Docker when parsing the env-file
Expected results
Able to pass in app settings via env-file.
Steps to reproduce the problem
docker run --env-file=repro.list hello-world
System information
docker version:
Docker version 1.8.1, build d12ea79
docker info:
Containers: 0
Images: 75
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 75
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.0.9-boot2docker
Operating System: Boot2Docker 1.8.1 (TCL 6.3); master : 7f12e95 - Thu Aug 13 03:24:56 UTC 2015
CPUs: 1
Total Memory: 996.2 MiB
Name: riclaw
ID: SQYV:M5J4:4RAR:6DKG:4IVN:J4RB:H3AN:FRBT:N635:WVZF:OW67:O2SR
Debug mode (server): true
File Descriptors: 11
Goroutines: 19
System Time: 2015-09-24T23:41:00.367346747Z
EventsListeners: 0
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
provider=virtualbox
uname -a:
Darwin belclar1114.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Provide additional environment details (AWS, VirtualBox, physical, etc.):
Mac running w/ Docker Toolbox
----------END REPORT ---------
The text was updated successfully, but these errors were encountered: