You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
Describe the bug
Docker has a specific way to handle globally defined ARGs (ARGs above a FROM stage). Those globally defined ARGs can be reused in several FROM blocks. E.g. if you want to use ARGs which are defined in the Dockerfile.base, you can reuse them in the package specific Dockerfiles via redefinition. But those definitions will be eleminated via lerna-dockerize.
Example Dockerfile.base
# This is the base stage, which prepares the project for further builds with lerna-dockerize.
# global arguments
ARG AWESOME_ARG=test
FROM node:12-slim
ARG AWESOME_ARG
RUN echo "varibale content: $AWESOME_ARG"
# do other stuff
To Reproduce
Steps to reproduce the behavior:
add a block with a ARG definition above the FROM command in within the Dockerfile.base
run npm run lerna-dockerize in you project
see the compiled output --> your defined ARG does not exist in the output file
Expected behavior
The globally defined ARG should be taken into the output file.
Desktop (please complete the following information):
Describe the bug
Docker has a specific way to handle globally defined ARGs (ARGs above a FROM stage). Those globally defined ARGs can be reused in several FROM blocks. E.g. if you want to use ARGs which are defined in the
Dockerfile.base
, you can reuse them in the package specific Dockerfiles via redefinition. But those definitions will be eleminated via lerna-dockerize.Example
Dockerfile.base
To Reproduce
Steps to reproduce the behavior:
npm run lerna-dockerize
in you projectExpected behavior
The globally defined ARG should be taken into the output file.
Desktop (please complete the following information):
Additional context
See further information about ARG handling in docker documentation: https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
The text was updated successfully, but these errors were encountered: