Copy files from Container to host using Dockerfile2019 Community Moderator ElectionHow is Docker different from a virtual machine?How to list containers in DockerHow to get a Docker container's IP address from the host?How to remove old Docker containersWhat is the difference between CMD and ENTRYPOINT in a Dockerfile?Copying files from Docker container to hostCopying files from host to Docker containerHow to copy Docker images from one host to another without using a repositoryWhat is the difference between the `COPY` and `ADD` commands in a Dockerfile?How can I add a volume to an existing Docker container?

Why does Solve lock up when trying to solve the quadratic equation with large integers?

How do we create new idioms and use them in a novel?

What is Tony Stark injecting into himself in Iron Man 3?

What is the purpose of "me" in "Je me suis trompé dans mon calcul."?

Why does cron require MTA for logging?

How to resolve: Reviewer #1 says remove section X vs. Reviewer #2 says expand section X

Is this Paypal Github SDK reference really a dangerous site?

Giving a career talk in my old university, how prominently should I tell students my salary?

How do spaceships determine each other's mass in space?

What materials can be used to make a humanoid skin warm?

After `ssh` without `-X` to a machine, is it possible to change `$DISPLAY` to make it work like `ssh -X`?

Does "Until when" sound natural for native speakers?

Signed and unsigned numbers

Has a sovereign Communist government ever run, and conceded loss, on a fair election?

Is it safe to abruptly remove Arduino power?

In the late 1940’s to early 1950’s what technology was available that could melt ice?

What's the 'present simple' form of the word "нашла́" in 3rd person singular female?

From an axiomatic set theoric approach why can we take uncountable unions?

Is it possible to find 2014 distinct positive integers whose sum is divisible by each of them?

Getting the || sign while using Kurier

How to design an organic heat-shield?

Expressing logarithmic equations without logs

What do *foreign films* mean for an American?

Was it really inappropriate to write a pull request for the company I interviewed with?



Copy files from Container to host using Dockerfile



2019 Community Moderator ElectionHow is Docker different from a virtual machine?How to list containers in DockerHow to get a Docker container's IP address from the host?How to remove old Docker containersWhat is the difference between CMD and ENTRYPOINT in a Dockerfile?Copying files from Docker container to hostCopying files from host to Docker containerHow to copy Docker images from one host to another without using a repositoryWhat is the difference between the `COPY` and `ADD` commands in a Dockerfile?How can I add a volume to an existing Docker container?










1















I am writing a Docker File and my requirement is to copy the content of a folder inside the container to local host. How can I acheive this?



FROM ubuntu

RUN apt-get update && apt-get install -y apache2 && apt-get install nginx -y


#COPY resources /var/www/html/

#VOLUME /var/www/html:/var/www/html

COPY /var/www/html/ /var/www/html/
CMD ["nginx", "-g", "daemon off;"]









share|improve this question
























  • Have you tried with VOLUME <your_folder_inside>, after build docker run -v <your_folder_inside>, and after that your host dir /var/lib/docker/volumes/<your_folder_inside>`?

    – mulg0r
    Jun 13 '18 at 15:45















1















I am writing a Docker File and my requirement is to copy the content of a folder inside the container to local host. How can I acheive this?



FROM ubuntu

RUN apt-get update && apt-get install -y apache2 && apt-get install nginx -y


#COPY resources /var/www/html/

#VOLUME /var/www/html:/var/www/html

COPY /var/www/html/ /var/www/html/
CMD ["nginx", "-g", "daemon off;"]









share|improve this question
























  • Have you tried with VOLUME <your_folder_inside>, after build docker run -v <your_folder_inside>, and after that your host dir /var/lib/docker/volumes/<your_folder_inside>`?

    – mulg0r
    Jun 13 '18 at 15:45













1












1








1








I am writing a Docker File and my requirement is to copy the content of a folder inside the container to local host. How can I acheive this?



FROM ubuntu

RUN apt-get update && apt-get install -y apache2 && apt-get install nginx -y


#COPY resources /var/www/html/

#VOLUME /var/www/html:/var/www/html

COPY /var/www/html/ /var/www/html/
CMD ["nginx", "-g", "daemon off;"]









share|improve this question
















I am writing a Docker File and my requirement is to copy the content of a folder inside the container to local host. How can I acheive this?



FROM ubuntu

RUN apt-get update && apt-get install -y apache2 && apt-get install nginx -y


#COPY resources /var/www/html/

#VOLUME /var/www/html:/var/www/html

COPY /var/www/html/ /var/www/html/
CMD ["nginx", "-g", "daemon off;"]






docker dockerfile






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 6 at 14:29









Biffen

4,27652230




4,27652230










asked Jun 13 '18 at 9:00









Vetrivelkumar PandiVetrivelkumar Pandi

448




448












  • Have you tried with VOLUME <your_folder_inside>, after build docker run -v <your_folder_inside>, and after that your host dir /var/lib/docker/volumes/<your_folder_inside>`?

    – mulg0r
    Jun 13 '18 at 15:45

















  • Have you tried with VOLUME <your_folder_inside>, after build docker run -v <your_folder_inside>, and after that your host dir /var/lib/docker/volumes/<your_folder_inside>`?

    – mulg0r
    Jun 13 '18 at 15:45
















Have you tried with VOLUME <your_folder_inside>, after build docker run -v <your_folder_inside>, and after that your host dir /var/lib/docker/volumes/<your_folder_inside>`?

– mulg0r
Jun 13 '18 at 15:45





Have you tried with VOLUME <your_folder_inside>, after build docker run -v <your_folder_inside>, and after that your host dir /var/lib/docker/volumes/<your_folder_inside>`?

– mulg0r
Jun 13 '18 at 15:45












3 Answers
3






active

oldest

votes


















2














It is probably a bad idea to copy files from the container to the host during build. You should seriously consider your use case.



However, it can be done and I will share with you a procedure b/c it is an opportunity for me to show off my Docker knowledge - not b/c I think you should do this. There are other ways to do this. My way is not better or worse - they are all kludges.



  1. Modify your dockerd configuration as explained in https://success.docker.com/article/how-do-i-enable-the-remote-api-for-dockerd. Basically add -H tcp://0.0.0.0:2376. This is a very risky procedure b/c it opens you open to be rooted by anyone on your network. There are ways to mitigate this risk with authentication, but really the best way is to JUST DON'T DO IT.

  2. Modify your Dockerfile:

    1. Add a ARG DOCKER_HOST before the RUN blocks.

    2. In the run blocks:

      1. Install docker.

      2. Add `export DOCKER_HOST=$DOCKER_HOST.

      3. Add docker container run --mount type=bind,source=/,destination=/srv/host alpine:3.4 ...



  3. Determine the IP address of your host computer. Let us assume it is 10.10.20.100.

  4. Modify your build command by adding --build-arg DOCKER_HOST=10.10.20.100.

In step 2.2.3 you have rooted the host computer and you can do whatever you want - including writing to any file.



This is a dumb idea, but it shows that since you can run docker from within a build, there really is not anything you can not do from inside a build. If you want to run a gui app from inside a build you can do it.






share|improve this answer






























    1














    There's no support for writing a Dockerfile with a statement to modify files on the host during docker build. You should keep in mind that the actual image build might happen in another Docker engine than the one where you kick off the build (the Dockerfile along with its build context are uploaded to the Docker Engine).



    There are at least two options here:



    1) Write a RUN statement that uses a BUILD_ARG to reach out to another host and triggers some action there. I consider this as a very bad hack, so I prefer not to be more specific about how that statement might look like.



    2) Perform the desired actions an a normal docker run, where you can mount a host's directory as volume into the container.



    I haven't looked into the https://github.com/genuinetools/img tool, yet. It also aims at building images, but might provide more possibilities during build time.






    share|improve this answer






























      0














      There is no specific way to do this during the build process. At runtime you can copy files out via a mounted volume, but this is not available during the build process. If you just mean at run time then you can do things like docker run -v .:/out myimage -- cp -r /from/somewhere /out or similar.






      share|improve this answer























      • Thanks, I am getting error as below . Iwant to copy the content of :/var/www/html/ from container to host location of :/var/www/html/ root@ionapp:~/nginx# docker run -v /var/www/html/:/var/www/html/ ngnxvolume1 -- cp -r /var/www/html/ /var/www/html/ docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "--": executable file not found in $PATH": unknown. ERRO[0002] error waiting for container: context canceled root@ionapp:~/nginx#

        – Vetrivelkumar Pandi
        Jun 13 '18 at 9:22












      • You need to use a different mount point, and possibly you need a different command (possibly using docker cp as mentioned elsewhere) if the cp binary isn't available. Try /bin/cp.

        – coderanger
        Jun 13 '18 at 9:24










      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50833148%2fcopy-files-from-container-to-host-using-dockerfile%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2














      It is probably a bad idea to copy files from the container to the host during build. You should seriously consider your use case.



      However, it can be done and I will share with you a procedure b/c it is an opportunity for me to show off my Docker knowledge - not b/c I think you should do this. There are other ways to do this. My way is not better or worse - they are all kludges.



      1. Modify your dockerd configuration as explained in https://success.docker.com/article/how-do-i-enable-the-remote-api-for-dockerd. Basically add -H tcp://0.0.0.0:2376. This is a very risky procedure b/c it opens you open to be rooted by anyone on your network. There are ways to mitigate this risk with authentication, but really the best way is to JUST DON'T DO IT.

      2. Modify your Dockerfile:

        1. Add a ARG DOCKER_HOST before the RUN blocks.

        2. In the run blocks:

          1. Install docker.

          2. Add `export DOCKER_HOST=$DOCKER_HOST.

          3. Add docker container run --mount type=bind,source=/,destination=/srv/host alpine:3.4 ...



      3. Determine the IP address of your host computer. Let us assume it is 10.10.20.100.

      4. Modify your build command by adding --build-arg DOCKER_HOST=10.10.20.100.

      In step 2.2.3 you have rooted the host computer and you can do whatever you want - including writing to any file.



      This is a dumb idea, but it shows that since you can run docker from within a build, there really is not anything you can not do from inside a build. If you want to run a gui app from inside a build you can do it.






      share|improve this answer



























        2














        It is probably a bad idea to copy files from the container to the host during build. You should seriously consider your use case.



        However, it can be done and I will share with you a procedure b/c it is an opportunity for me to show off my Docker knowledge - not b/c I think you should do this. There are other ways to do this. My way is not better or worse - they are all kludges.



        1. Modify your dockerd configuration as explained in https://success.docker.com/article/how-do-i-enable-the-remote-api-for-dockerd. Basically add -H tcp://0.0.0.0:2376. This is a very risky procedure b/c it opens you open to be rooted by anyone on your network. There are ways to mitigate this risk with authentication, but really the best way is to JUST DON'T DO IT.

        2. Modify your Dockerfile:

          1. Add a ARG DOCKER_HOST before the RUN blocks.

          2. In the run blocks:

            1. Install docker.

            2. Add `export DOCKER_HOST=$DOCKER_HOST.

            3. Add docker container run --mount type=bind,source=/,destination=/srv/host alpine:3.4 ...



        3. Determine the IP address of your host computer. Let us assume it is 10.10.20.100.

        4. Modify your build command by adding --build-arg DOCKER_HOST=10.10.20.100.

        In step 2.2.3 you have rooted the host computer and you can do whatever you want - including writing to any file.



        This is a dumb idea, but it shows that since you can run docker from within a build, there really is not anything you can not do from inside a build. If you want to run a gui app from inside a build you can do it.






        share|improve this answer

























          2












          2








          2







          It is probably a bad idea to copy files from the container to the host during build. You should seriously consider your use case.



          However, it can be done and I will share with you a procedure b/c it is an opportunity for me to show off my Docker knowledge - not b/c I think you should do this. There are other ways to do this. My way is not better or worse - they are all kludges.



          1. Modify your dockerd configuration as explained in https://success.docker.com/article/how-do-i-enable-the-remote-api-for-dockerd. Basically add -H tcp://0.0.0.0:2376. This is a very risky procedure b/c it opens you open to be rooted by anyone on your network. There are ways to mitigate this risk with authentication, but really the best way is to JUST DON'T DO IT.

          2. Modify your Dockerfile:

            1. Add a ARG DOCKER_HOST before the RUN blocks.

            2. In the run blocks:

              1. Install docker.

              2. Add `export DOCKER_HOST=$DOCKER_HOST.

              3. Add docker container run --mount type=bind,source=/,destination=/srv/host alpine:3.4 ...



          3. Determine the IP address of your host computer. Let us assume it is 10.10.20.100.

          4. Modify your build command by adding --build-arg DOCKER_HOST=10.10.20.100.

          In step 2.2.3 you have rooted the host computer and you can do whatever you want - including writing to any file.



          This is a dumb idea, but it shows that since you can run docker from within a build, there really is not anything you can not do from inside a build. If you want to run a gui app from inside a build you can do it.






          share|improve this answer













          It is probably a bad idea to copy files from the container to the host during build. You should seriously consider your use case.



          However, it can be done and I will share with you a procedure b/c it is an opportunity for me to show off my Docker knowledge - not b/c I think you should do this. There are other ways to do this. My way is not better or worse - they are all kludges.



          1. Modify your dockerd configuration as explained in https://success.docker.com/article/how-do-i-enable-the-remote-api-for-dockerd. Basically add -H tcp://0.0.0.0:2376. This is a very risky procedure b/c it opens you open to be rooted by anyone on your network. There are ways to mitigate this risk with authentication, but really the best way is to JUST DON'T DO IT.

          2. Modify your Dockerfile:

            1. Add a ARG DOCKER_HOST before the RUN blocks.

            2. In the run blocks:

              1. Install docker.

              2. Add `export DOCKER_HOST=$DOCKER_HOST.

              3. Add docker container run --mount type=bind,source=/,destination=/srv/host alpine:3.4 ...



          3. Determine the IP address of your host computer. Let us assume it is 10.10.20.100.

          4. Modify your build command by adding --build-arg DOCKER_HOST=10.10.20.100.

          In step 2.2.3 you have rooted the host computer and you can do whatever you want - including writing to any file.



          This is a dumb idea, but it shows that since you can run docker from within a build, there really is not anything you can not do from inside a build. If you want to run a gui app from inside a build you can do it.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 13 '18 at 14:39









          emoryemory

          9,28212350




          9,28212350























              1














              There's no support for writing a Dockerfile with a statement to modify files on the host during docker build. You should keep in mind that the actual image build might happen in another Docker engine than the one where you kick off the build (the Dockerfile along with its build context are uploaded to the Docker Engine).



              There are at least two options here:



              1) Write a RUN statement that uses a BUILD_ARG to reach out to another host and triggers some action there. I consider this as a very bad hack, so I prefer not to be more specific about how that statement might look like.



              2) Perform the desired actions an a normal docker run, where you can mount a host's directory as volume into the container.



              I haven't looked into the https://github.com/genuinetools/img tool, yet. It also aims at building images, but might provide more possibilities during build time.






              share|improve this answer



























                1














                There's no support for writing a Dockerfile with a statement to modify files on the host during docker build. You should keep in mind that the actual image build might happen in another Docker engine than the one where you kick off the build (the Dockerfile along with its build context are uploaded to the Docker Engine).



                There are at least two options here:



                1) Write a RUN statement that uses a BUILD_ARG to reach out to another host and triggers some action there. I consider this as a very bad hack, so I prefer not to be more specific about how that statement might look like.



                2) Perform the desired actions an a normal docker run, where you can mount a host's directory as volume into the container.



                I haven't looked into the https://github.com/genuinetools/img tool, yet. It also aims at building images, but might provide more possibilities during build time.






                share|improve this answer

























                  1












                  1








                  1







                  There's no support for writing a Dockerfile with a statement to modify files on the host during docker build. You should keep in mind that the actual image build might happen in another Docker engine than the one where you kick off the build (the Dockerfile along with its build context are uploaded to the Docker Engine).



                  There are at least two options here:



                  1) Write a RUN statement that uses a BUILD_ARG to reach out to another host and triggers some action there. I consider this as a very bad hack, so I prefer not to be more specific about how that statement might look like.



                  2) Perform the desired actions an a normal docker run, where you can mount a host's directory as volume into the container.



                  I haven't looked into the https://github.com/genuinetools/img tool, yet. It also aims at building images, but might provide more possibilities during build time.






                  share|improve this answer













                  There's no support for writing a Dockerfile with a statement to modify files on the host during docker build. You should keep in mind that the actual image build might happen in another Docker engine than the one where you kick off the build (the Dockerfile along with its build context are uploaded to the Docker Engine).



                  There are at least two options here:



                  1) Write a RUN statement that uses a BUILD_ARG to reach out to another host and triggers some action there. I consider this as a very bad hack, so I prefer not to be more specific about how that statement might look like.



                  2) Perform the desired actions an a normal docker run, where you can mount a host's directory as volume into the container.



                  I haven't looked into the https://github.com/genuinetools/img tool, yet. It also aims at building images, but might provide more possibilities during build time.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jun 13 '18 at 9:14









                  gesellixgesellix

                  2,1311818




                  2,1311818





















                      0














                      There is no specific way to do this during the build process. At runtime you can copy files out via a mounted volume, but this is not available during the build process. If you just mean at run time then you can do things like docker run -v .:/out myimage -- cp -r /from/somewhere /out or similar.






                      share|improve this answer























                      • Thanks, I am getting error as below . Iwant to copy the content of :/var/www/html/ from container to host location of :/var/www/html/ root@ionapp:~/nginx# docker run -v /var/www/html/:/var/www/html/ ngnxvolume1 -- cp -r /var/www/html/ /var/www/html/ docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "--": executable file not found in $PATH": unknown. ERRO[0002] error waiting for container: context canceled root@ionapp:~/nginx#

                        – Vetrivelkumar Pandi
                        Jun 13 '18 at 9:22












                      • You need to use a different mount point, and possibly you need a different command (possibly using docker cp as mentioned elsewhere) if the cp binary isn't available. Try /bin/cp.

                        – coderanger
                        Jun 13 '18 at 9:24















                      0














                      There is no specific way to do this during the build process. At runtime you can copy files out via a mounted volume, but this is not available during the build process. If you just mean at run time then you can do things like docker run -v .:/out myimage -- cp -r /from/somewhere /out or similar.






                      share|improve this answer























                      • Thanks, I am getting error as below . Iwant to copy the content of :/var/www/html/ from container to host location of :/var/www/html/ root@ionapp:~/nginx# docker run -v /var/www/html/:/var/www/html/ ngnxvolume1 -- cp -r /var/www/html/ /var/www/html/ docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "--": executable file not found in $PATH": unknown. ERRO[0002] error waiting for container: context canceled root@ionapp:~/nginx#

                        – Vetrivelkumar Pandi
                        Jun 13 '18 at 9:22












                      • You need to use a different mount point, and possibly you need a different command (possibly using docker cp as mentioned elsewhere) if the cp binary isn't available. Try /bin/cp.

                        – coderanger
                        Jun 13 '18 at 9:24













                      0












                      0








                      0







                      There is no specific way to do this during the build process. At runtime you can copy files out via a mounted volume, but this is not available during the build process. If you just mean at run time then you can do things like docker run -v .:/out myimage -- cp -r /from/somewhere /out or similar.






                      share|improve this answer













                      There is no specific way to do this during the build process. At runtime you can copy files out via a mounted volume, but this is not available during the build process. If you just mean at run time then you can do things like docker run -v .:/out myimage -- cp -r /from/somewhere /out or similar.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jun 13 '18 at 9:12









                      coderangercoderanger

                      30.4k32746




                      30.4k32746












                      • Thanks, I am getting error as below . Iwant to copy the content of :/var/www/html/ from container to host location of :/var/www/html/ root@ionapp:~/nginx# docker run -v /var/www/html/:/var/www/html/ ngnxvolume1 -- cp -r /var/www/html/ /var/www/html/ docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "--": executable file not found in $PATH": unknown. ERRO[0002] error waiting for container: context canceled root@ionapp:~/nginx#

                        – Vetrivelkumar Pandi
                        Jun 13 '18 at 9:22












                      • You need to use a different mount point, and possibly you need a different command (possibly using docker cp as mentioned elsewhere) if the cp binary isn't available. Try /bin/cp.

                        – coderanger
                        Jun 13 '18 at 9:24

















                      • Thanks, I am getting error as below . Iwant to copy the content of :/var/www/html/ from container to host location of :/var/www/html/ root@ionapp:~/nginx# docker run -v /var/www/html/:/var/www/html/ ngnxvolume1 -- cp -r /var/www/html/ /var/www/html/ docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "--": executable file not found in $PATH": unknown. ERRO[0002] error waiting for container: context canceled root@ionapp:~/nginx#

                        – Vetrivelkumar Pandi
                        Jun 13 '18 at 9:22












                      • You need to use a different mount point, and possibly you need a different command (possibly using docker cp as mentioned elsewhere) if the cp binary isn't available. Try /bin/cp.

                        – coderanger
                        Jun 13 '18 at 9:24
















                      Thanks, I am getting error as below . Iwant to copy the content of :/var/www/html/ from container to host location of :/var/www/html/ root@ionapp:~/nginx# docker run -v /var/www/html/:/var/www/html/ ngnxvolume1 -- cp -r /var/www/html/ /var/www/html/ docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "--": executable file not found in $PATH": unknown. ERRO[0002] error waiting for container: context canceled root@ionapp:~/nginx#

                      – Vetrivelkumar Pandi
                      Jun 13 '18 at 9:22






                      Thanks, I am getting error as below . Iwant to copy the content of :/var/www/html/ from container to host location of :/var/www/html/ root@ionapp:~/nginx# docker run -v /var/www/html/:/var/www/html/ ngnxvolume1 -- cp -r /var/www/html/ /var/www/html/ docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "--": executable file not found in $PATH": unknown. ERRO[0002] error waiting for container: context canceled root@ionapp:~/nginx#

                      – Vetrivelkumar Pandi
                      Jun 13 '18 at 9:22














                      You need to use a different mount point, and possibly you need a different command (possibly using docker cp as mentioned elsewhere) if the cp binary isn't available. Try /bin/cp.

                      – coderanger
                      Jun 13 '18 at 9:24





                      You need to use a different mount point, and possibly you need a different command (possibly using docker cp as mentioned elsewhere) if the cp binary isn't available. Try /bin/cp.

                      – coderanger
                      Jun 13 '18 at 9:24

















                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50833148%2fcopy-files-from-container-to-host-using-dockerfile%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

                      Алба-Юлія

                      Захаров Федір Захарович