Having the following Dockerfile
FROM openjdk:8-jre-alpine
ENV ZOO_PORT=2181
EXPOSE $ZOO_PORT
I get an error message Invalid containerPort: $ZOO_PORT which is incorrect, since environment variables are supported by the following list of instructions in the Dockerfile:
ADD
COPY
ENV
EXPOSE
FROM
LABEL
STOPSIGNAL
USER
VOLUME
WORKDIR
as well as:
ONBUILD (when combined with one of the supported instructions above)