You can use wildcards to optionally copy. For example, to COPY a yarn.lock file that may or may not exist, do:
COPY package.json yarn.* /opt/app/
Share and learn in the Docker community.
You can use wildcards to optionally copy. For example, to COPY a yarn.lock file that may or may not exist, do:
COPY package.json yarn.* /opt/app/