Problem with sending build context to Docker daemon when resolving Docker build

Source: Internet
Author: User

When using the Dockerfile build image, the advantage is that the content sent to Daemo is too large

Build image:q_build/javaweb:20150910174642sending build context to docker daemon  4.768 gbsending build context to docker daemon step 0 :  FROM 192.168.100.123:5000/q_basic/javaweb:1.0 ---> 0aab72ab2945step 1 :  MAINTAINER tyleryan <[email protected]> ---> Running in  177026c30954 ---> 3cc2be8f728dremoving intermediate container 177026c30954step  2 : ADD monitor.war /usr/local/tomcat/webapps/ --->  b8b56342b691removing intermediate container c0108ff358f3step 3 : expose  8080 ---> Running in 451fa4de3e21 ---> 13f7293f7ffeRemoving  Intermediate container 451fa4de3e21successfully built 13f7293f7ffedelete locally  build docker images:q_build/javaweb:20150910174642 

But our dokerfile is very simple, so where does this extra content come from?

After reviewing the information,

The Docker client is found to send all files in the Dockerfile sibling directory to Dockerdaemon by default.

?

There are two ways to solve this problem:

1. Use the. dockerignore file, set the blacklist, the file contains the directory will not be sent to the Docker daemon

2. Perform the dockerfile after the migration in the other directory.

Resolve Docker build when sending build context to Docker daemon

This article is from the "Stray Cattle" blog, please be sure to keep this source http://wjn219.blog.51cto.com/1497135/1717135

Problem with sending build context to Docker daemon when resolving Docker build

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.