diff --git a/environment/Dockerfile b/environment/Dockerfile index 3d8b98a..1f96d16 100644 --- a/environment/Dockerfile +++ b/environment/Dockerfile @@ -52,6 +52,18 @@ RUN echo $SECRETS1_TO_ENV # let's see if bind env SECRET1_TO_ENV and run in one RUN command, can it be access? RUN npm run print-var +# [script Print in Dockerfile]: +# VAR_IN_REPO : undefined +# SECRET_IN_REPO : undefined +# VAR_IN_JOB1 : undefined +# VAR_IN_STEP1 : undefined +# VAR_IN_RUN : undefined +# BUILD_ARG1 : +# SECRETS1 : undefined +# SECRET_ENV_1 : undefined +# VAR_IN_DOCKERFILE : + + RUN --mount=type=secret,id=SECRET_ENV_1,env=SECRET_ENV_1 \ npm run print-var # the answer is: yes diff --git a/environment/printVarsByDockerfile.js b/environment/printVarsByDockerfile.js index 6ccfa35..4c499b3 100644 --- a/environment/printVarsByDockerfile.js +++ b/environment/printVarsByDockerfile.js @@ -3,7 +3,3 @@ console.log('[script Print in Dockerfile]:') envKeys.forEach(key=>{ console.log(key,":",process.env[key]) }) -/* -result: - -*/ \ No newline at end of file