From 1ce4ea9af5fd618897a54ec3750c71b5c5255cb7 Mon Sep 17 00:00:00 2001 From: Timothy Messier Date: Wed, 25 May 2022 14:34:53 -0400 Subject: [PATCH] chore(docker): Add dockerignore file to reduce context size (#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 --- .dockerignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..0b18ed53d4 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +** +!bin/** +!dist/** +!.release/docker/**