IssueRaiser

Allow to use environment variables in COPY --from

Docker composes has the notion of project name (a prefix for the services). It may be set with env. var. $COMPOSE_PROJECT_NAME. It would be good if we can use it with COPY --from inside Dockerfiles: ``` FROM ubuntu:xenial COPY --from=${COMPOSE_PROJECT_NAME}_container /opt /opt ``` It gives error: ``` ERROR: Service '...' failed to build: invalid from flag value ${COMPOSE_PROJECT_NAME}_container: invalid reference format: repository name must be lowercase ```

Posted by asfernandes on Aug 11, 2017, 2:52 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments

github (Other)

Allow to use environment variables in COPY --from

asfernandesAug 11, 2017, 2:52 AM

Docker composes has the notion of project name (a prefix for the services). It may be set with env. var. $COMPOSE_PROJECT_NAME. It would be good if we can use it with COPY --from inside Dockerfiles: ``` FROM ubuntu:xenial COPY --from=${COMPOSE_PROJECT_NAME}_container /opt /opt ``` It gives error: ``` ERROR: Service '...' failed to build: invalid from flag value ${COMPOSE_PROJECT_NAME}_container: invalid reference format: repository name must be lowercase ```

Comments (0)

No comments yet. Start the discussion.

Comment on this issue