Docker Build with ARG not passing

1.5k views Asked by At

Docker file:

# copy over system jboss configs
    ARG SYSTEM_TYPE
    COPY $SYSTEM_TYPE/AP/standalone.conf  $JBOSS_HOME/bin/standalone.conf
    COPY $SYSTEM_TYPE/AP/standalone-ha-bob.xml  $JBOSS_HOME/bin/standalone-ha-bob.xml

Docker Command:

docker build --build-arg SERVER_TYPE=jbossconf/ENT-UAT/ -f /usr/etc/repos/docker-files/test-dockerfile-app -t appserver/test:1.0 .

Docker Build Result:

Step 15 : COPY $SYSTEM_TYPE/AP/standalone.conf $JBOSS_HOME/bin/standalone.conf
lstat AP/standalone.conf: no such file or directory

The --build-arg does not appear to be passing to the dockerfile. Where am I going wrong?

1

There are 1 answers

1
Juan Sebastian On BEST ANSWER

On your build args you are passing SERVER_TYPE and referencing $SYSTEM_TYPE on your dockerfile, that should fix it!