2

I've set an environment variable (NPM_TOKEN) for my repo in Docker Cloud to use when building my Dockerfile. However, the variable is always empty...

Tried both of these in Dockerfile:

RUN echo ${NPM_TOKEN}

and:

ARG NPM_TOKEN
RUN echo ${NPM_TOKEN}

Am I wrong in assuming that Docker Clouds environment variables for build does the same thing as --build-arg?

Anders Bornholm
  • 1,326
  • 7
  • 18

1 Answers1

0

It took me along time, but you can use build hooks to set variables for automated builds!

https://docs.docker.com/docker-cloud/builds/advanced/#build-hook-examples