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