2 DL3021
José Lorenzo Rodríguez edited this page 2018-01-25 10:27:00 +01:00

COPY with more than 2 arguments requires the last argument to end with /

Problematic code:

FROM node:carbon
COPY package.json yarn.lock my_app

Correct code:

FROM node:carbon
COPY package.json yarn.lock my_app/

Rationale:

https://docs.docker.com/engine/reference/builder/#copy

If multiple resources are specified, either directly or due to the use of a wildcard, then must be a directory, and it must end with a slash /