What is the default location for included files when building a docker image?

前端 未结 1 487
情深已故
情深已故 2020-12-11 12:15
derrend@laptop ~/topdir $ docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d
OS/Arch (client): l         


        
相关标签:
1条回答
  • 2020-12-11 12:46

    Those files are not part of the built (end-result) image.

    They are part of the build context passed to the daemon during the build process, to be used by Dockerfile directives like ADD or COPY or RUN.

    A build’s context is the files located in the specified PATH or URL

    For example, run this command to use a directory called docker in the branch container:

    $ docker build https://github.com/docker/rootfs.git#container:docker
    

    This is managed by Context and ModifiableContext.

    0 讨论(0)
提交回复
热议问题