Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

Commit 7af09b5

Browse files
author
James Glover
committed
Add .dockerignore file
Local container builds were breaking due to the contents of the node_modules directory. This change adds a dockerignore file, which prevents them from being copied to the container. We also add a handful of other directories which could potentially cause problems in future, or which are unnecessary to the app running.
1 parent 9d2d91d commit 7af09b5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.dockerignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file
2+
# Avoids copying these files into our docker-container
3+
4+
# Node modules can break docker-builds on the local machine if it gets
5+
# coppied to the container. (You'll see yarn integrity errors)
6+
node_modules
7+
# .bundle contains bundler configuration which is specific to our local system
8+
.bundle
9+
10+
# These folders store transisent informatation and aren't relevant between
11+
# systems. They are in our .gitignore, so we also add them here to keep
12+
# local builds consistent.
13+
log
14+
tmp
15+
16+
# We're building our container for production, so lets exclude the test and
17+
# spec folders. This will keep our container size a little smaller
18+
test
19+
spec

0 commit comments

Comments
 (0)