Dockerfile "COPY requires at least two arguments" in CI
The Dockerfile parser rejected a COPY that has only one argument. COPY needs both a source and a destination, so a single token leaves the destination undetermined.
What this error means
docker build fails at parse time with "COPY requires at least two arguments, but only one was provided. Destination could not be determined."
COPY requires at least two arguments, but only one was provided.
Destination could not be determined.Common causes
Missing destination argument
The instruction is written as COPY app.py with nothing after it, so there is no destination path.
An unexpanded variable collapsed the arguments
A build ARG that resolved to empty removed the destination, leaving a single argument.
How to fix it
Provide a destination
Give COPY both a source and a destination path.
COPY app.py /app/
# or copy into the current WORKDIR
COPY app.py .Verify any variables resolve
- Check that ARG or ENV values used in the COPY are set.
- Print them during build if a destination keeps collapsing.
- Quote paths that may contain spaces.
How to prevent it
- Always write COPY with an explicit destination.
- Confirm build args used in paths are defined.
- Lint the Dockerfile to catch single-argument COPY early.