Docker build “Sending build context to Docker daemon 10.62GB” why so big?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I'm introducing myself to docker from a book and I followed a simple instruction to make a Dockerfile and run the build command as follows:



Dockerfile contents:



FROM busybox:latest
CMD echo Hello World!


then I ran:



sudo docker build .


in the folder that the Dockerfile was in.
My question is, what exactly is the 10.62GB that is in the "Sending build context to Docker daemon"?
to build this image it took about 7 or 8 minutest to build while this figure climbed its way up to 10.62GB.
Is that normal? I thought, is this representing the image size because I thought container images were relatively small?



Thanks.










share|improve this question

























    up vote
    0
    down vote

    favorite












    I'm introducing myself to docker from a book and I followed a simple instruction to make a Dockerfile and run the build command as follows:



    Dockerfile contents:



    FROM busybox:latest
    CMD echo Hello World!


    then I ran:



    sudo docker build .


    in the folder that the Dockerfile was in.
    My question is, what exactly is the 10.62GB that is in the "Sending build context to Docker daemon"?
    to build this image it took about 7 or 8 minutest to build while this figure climbed its way up to 10.62GB.
    Is that normal? I thought, is this representing the image size because I thought container images were relatively small?



    Thanks.










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm introducing myself to docker from a book and I followed a simple instruction to make a Dockerfile and run the build command as follows:



      Dockerfile contents:



      FROM busybox:latest
      CMD echo Hello World!


      then I ran:



      sudo docker build .


      in the folder that the Dockerfile was in.
      My question is, what exactly is the 10.62GB that is in the "Sending build context to Docker daemon"?
      to build this image it took about 7 or 8 minutest to build while this figure climbed its way up to 10.62GB.
      Is that normal? I thought, is this representing the image size because I thought container images were relatively small?



      Thanks.










      share|improve this question













      I'm introducing myself to docker from a book and I followed a simple instruction to make a Dockerfile and run the build command as follows:



      Dockerfile contents:



      FROM busybox:latest
      CMD echo Hello World!


      then I ran:



      sudo docker build .


      in the folder that the Dockerfile was in.
      My question is, what exactly is the 10.62GB that is in the "Sending build context to Docker daemon"?
      to build this image it took about 7 or 8 minutest to build while this figure climbed its way up to 10.62GB.
      Is that normal? I thought, is this representing the image size because I thought container images were relatively small?



      Thanks.







      16.04 docker






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 18 at 11:56









      Bucephalus

      1104




      1104




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          The build context that is being sent to the Docker daemon is all the files/folders that are in the current directory that you specified in the command sudo docker build .



          In your current directory, try to only have the files/folders necessary for building your image. This would include your Dockerfile, and any required files/folders you are porting into your Docker image.



          You can also create a .dockerignore file to specify the files/folders you would want Docker to ignore when building.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            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',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1016980%2fdocker-build-sending-build-context-to-docker-daemon-10-62gb-why-so-big%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted










            The build context that is being sent to the Docker daemon is all the files/folders that are in the current directory that you specified in the command sudo docker build .



            In your current directory, try to only have the files/folders necessary for building your image. This would include your Dockerfile, and any required files/folders you are porting into your Docker image.



            You can also create a .dockerignore file to specify the files/folders you would want Docker to ignore when building.






            share|improve this answer
























              up vote
              1
              down vote



              accepted










              The build context that is being sent to the Docker daemon is all the files/folders that are in the current directory that you specified in the command sudo docker build .



              In your current directory, try to only have the files/folders necessary for building your image. This would include your Dockerfile, and any required files/folders you are porting into your Docker image.



              You can also create a .dockerignore file to specify the files/folders you would want Docker to ignore when building.






              share|improve this answer






















                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                The build context that is being sent to the Docker daemon is all the files/folders that are in the current directory that you specified in the command sudo docker build .



                In your current directory, try to only have the files/folders necessary for building your image. This would include your Dockerfile, and any required files/folders you are porting into your Docker image.



                You can also create a .dockerignore file to specify the files/folders you would want Docker to ignore when building.






                share|improve this answer












                The build context that is being sent to the Docker daemon is all the files/folders that are in the current directory that you specified in the command sudo docker build .



                In your current directory, try to only have the files/folders necessary for building your image. This would include your Dockerfile, and any required files/folders you are porting into your Docker image.



                You can also create a .dockerignore file to specify the files/folders you would want Docker to ignore when building.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 24 at 15:13









                Ali Nobari

                384




                384



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1016980%2fdocker-build-sending-build-context-to-docker-daemon-10-62gb-why-so-big%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    GRUB: Fatal! inconsistent data read from (0x84) 0+xxxxxx

                    What makes Checkinstall packages not suitable for distribution?

                    Running the scala interactive shell from the command line