ARG expansion in the Dockerfile COPY command is available starting with
docker version 19.XX. Before that(ex: 18.XX), ARG doesn't get expanded
in the COPY command so you'll get an error like:
unable to convert uid/gid chown string to host mapping: can't find
uid for user $USER_ID: no such user: $USER_ID
So, use a separate RUN command to chown instead of trying to do it in
the COPY command.
ARG expansion in the Dockerfile COPY command is available starting with docker version 19.XX. Before that(ex: 18.XX), ARG doesn't get expanded in the COPY command so you'll get an error like:
So, use a separate RUN command to chown instead of trying to do it in the COPY command.