Skip to content
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

Port incorrectly flagged as an error when an environment variable is used #192

Closed
rcjsuen opened this issue Nov 11, 2017 · 0 comments
Closed
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Nov 11, 2017

image

When an environment variable is used for an exposed port, it is flagged as an error. This is incorrect and the variable should be expanded and its contents inspected for validity instead.

FROM alpine
ENV ZOO_PORT=2181
EXPOSE $ZOO_PORT
$ docker build .
Sending build context to Docker daemon  1.571MB
Step 1/3 : FROM alpine
 ---> 053cde6e8953
Step 2/3 : ENV ZOO_PORT 2181
 ---> Running in 4ede84ae025c
 ---> 80e5a76ea8d0
Removing intermediate container 4ede84ae025c
Step 3/3 : EXPOSE $ZOO_PORT
 ---> Running in 82498978e7a2
 ---> 2bf905c88227
Removing intermediate container 82498978e7a2
Successfully built 2bf905c88227
FROM alpine
ARG ZOO_PORT=2181
EXPOSE $ZOO_PORT
Sending build context to Docker daemon  1.572MB
Step 1/3 : FROM alpine
 ---> 053cde6e8953
Step 2/3 : ARG ZOO_PORT=2181
 ---> Running in 8733dcf09636
 ---> 152ecf964c65
Removing intermediate container 8733dcf09636
Step 3/3 : EXPOSE $ZOO_PORT
 ---> Running in 18e4b82e04a8
 ---> 7f62f7ba4d30
Removing intermediate container 18e4b82e04a8
Successfully built 7f62f7ba4d30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant