PelionIoT / distro-pelion-edge

Scripts for generating pelion-edge deb (Ubuntu) installer
Apache License 2.0
1 stars 2 forks source link

Make Dockerfile backwards compatible with docker 18.XX #195

Closed ryannowarm closed 3 years ago

ryannowarm commented 3 years ago

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.