Open FernandoMiguel opened 6 years ago
Hacky workaround, as discussed on the slack:
ARG IMAGE_BUILDER_NAME
FROM ${IMAGE_BUILDER_NAME} as builder
FROM node:8-alpine
<code...>
COPY --from=builder /src/dist /app/dist
It would be nice to have ARG evaluation in COPY.
FYI—the ARG used in FROM must come before all the FROM lines. Took me way too long to figure this out!
https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
+1
Description
Steps to reproduce the issue:
Describe the results you received: invalid from flag value ${IMAGE_BUILDER_NAME}: invalid reference format: repository name must be lowercase
Describe the results you expected: Successfully built fe978fd298a
Output of
docker version
:Output of
docker info
:FROM node:8-alpine ARG IMAGE_BUILDER_NAME COPY --from=${IMAGE_BUILDER_NAME} /src/dist /app/dist