In June, before the Docker 1.0 release, CEO and Founder Solomon Hykes said to me that in the 1.1 release there would be .dockerignore functionality. Docker 1.1 is now live and true to his word, developers can now add a “
.dockerignore file next to their
Dockerfile and Docker will ignore files and directories specified in that file when sending the build context to the daemon. Here’s an example. Other udpates of note include:
- Containers are now paused when a commit is made.
- A developer can now tail the logs of a container.
- A tar archive can now be passed to
docker buildas context.
We write a lot of posts about Docker. There are other topics, of course, but the appetite for the lightweight contaner technology is almost insatiable. But its youth is well illustrated with the experiences developers have had when building apps. This is to be expected but something that is often overlooked in the excitement that has come with its ever growing popularity.
Conversations with developers and reviews of the ongoing threads and projects on GitHub showed issues in particular with how files were managed in the upload to the Docker developer environment and the complexities of managing containers in a production environment.
Murphy Randle of Space Monkey described in a post how to avoid the pain of NFS mounts/volumes that he would normally want with developing an app within Docker. At the time, he decided to build a developer environment that he knew would be practical for small apps but not big ones. The problem becomes evident when using A Dockerfile to automate the process of building a Docker image. But Randle wrote it became terribly slow when loading a number of node_modules directory.
In an interview online in May, Randle said that when the
docker build command is issued, the docker client uploaded the entire contents of the folder containing the docker file to the docker daemon. “This is super fast when it’s just a little bit of source code, but when your app depends on megabytes of node_modules, it takes a very long time way to long to make rapid iteration practical.” That was a problem cited in a long thread on GitHub that now has resulted in the .dockerignore update. The thread started with this: Docker has made improvements throughout the Docker ecosystem, including updates to Docker Engine, Docker Hub, and its documentation. Overall, not a major release, but more so a commentary on a still developing open source technology.