How to copy multiple files in one layer using a Dockerfile?

后端 未结 4 918
灰色年华
灰色年华 2020-12-02 08:47

The following Dockerfile contains four COPY layers:

COPY README.md ./
COPY package.json ./
COPY gulpfile.js ./
COPY __BUILD_NUMBER          


        
4条回答
  •  无人及你
    2020-12-02 09:35

    simple

    COPY README.md  package.json gulpfile.js __BUILD_NUMBER ./
    

    from the doc

    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 /.

提交回复
热议问题