Skip to content

Commit 1ce4ea9

Browse files
authored
chore(docker): Add dockerignore file to reduce context size (hashicorp#2022)
Since the Dockerfile is now at the repository root, when running building a docker image, the entire repository was being added to the context sent to the docker daemon. However, only the compiled binary and a few configs in `.release/docker` are needed to build the docker images. This ignore file will only send necessary fields into the context. This helps speed up the docker image building. For example, when building the dev image, without the ignore file: Sending build context to Docker daemon 2.043GB And with this ignore file: Sending build context to Docker daemon 130.7MB See: https://docs.docker.com/engine/reference/builder/#dockerignore-file
1 parent ec608b7 commit 1ce4ea9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**
2+
!bin/**
3+
!dist/**
4+
!.release/docker/**

0 commit comments

Comments
 (0)