Exclude additional files from Docker images

Excludes a few more files that are temporary, build artifacts, test
artifacts, runtime artifacts, or not used by the application. This has
the consequence of no longer needing to clear compiled assets during
build.
This commit is contained in:
Andrew Kvalheim 2021-06-17 17:30:41 -07:00 committed by Henne Vogelsang
parent 23ee15f10d
commit 5de5d7b55c
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
2 changed files with 9 additions and 1 deletions

View file

@ -1,2 +1,10 @@
.bundle/cache
.git/
coverage/
db/*.sqlite3
Dockerfile
docker-compose.*
log/
public/assets/
public/system/
tmp/

View file

@ -10,7 +10,7 @@ WORKDIR /osem/
RUN export NOKOGIRI_USE_SYSTEM_LIBRARIES=1; bundle install --jobs=3 --retry=3 --without test development
# Generate assets
RUN export RAILS_ENV=production; bundle exec rake assets:clobber assets:precompile
RUN export RAILS_ENV=production; bundle exec rake assets:precompile
ENV RAILS_ENV=production