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

Clash 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.
16.04 docker
add a comment |Â
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.
16.04 docker
add a comment |Â
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.
16.04 docker
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
16.04 docker
asked Mar 18 at 11:56
Bucephalus
1104
1104
add a comment |Â
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Apr 24 at 15:13
Ali Nobari
384
384
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password