X Tutup
Skip to content

ADD command doesn't support multiple source resources #279

@bschelberg

Description

@bschelberg

Docker supports multiple src resources for the ADD command: https://docs.docker.com/reference/builder/#add

In docker-java however, the ADD_OR_COPY_PATTERN in DockerfileStatement.Add prevents this from working.

I have a Dockerfile which contains a line like:

ADD src1 src2 /dest/

The Dockerfile builds without a problem when run directly with docker build. However, when I try to build the same Dockerfile using the Docker plugin on Jenkins, I get this error:

{"stream":"Step 7 : ADD src1 src2 /dest/\n"}
{"errorDetail":{"message":"src1: no such file or directory"},"error":"src1: no such file or directory"}

BTW, the Pattern may also have a problem with src or dest resources with spaces in their path. This is also supported by Docker, as long as the paths are surrounded by double quotes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup