Remove unused libraries and files from Docker image
This commit is contained in:
parent
5903b4d601
commit
c3a49e4260
2 changed files with 10 additions and 7 deletions
|
@ -3,6 +3,7 @@
|
|||
.sass-cache
|
||||
log
|
||||
config/database.yml
|
||||
doc
|
||||
public/assets
|
||||
public/system
|
||||
tmp/*
|
||||
|
|
16
Dockerfile
16
Dockerfile
|
@ -1,11 +1,7 @@
|
|||
FROM ruby:2.3
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends -y \
|
||||
cron \
|
||||
libv8-dev \
|
||||
libmagic-dev \
|
||||
libmysqlclient-dev && \
|
||||
apt-get install --no-install-recommends -y cron && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
apt-get clean
|
||||
|
||||
|
@ -13,8 +9,14 @@ ENV RAILS_ENV=production
|
|||
|
||||
WORKDIR /usr/src/app
|
||||
COPY . ./
|
||||
RUN echo $SOURCE_COMMIT > REVISION && \
|
||||
bundle install --without development --without test && \
|
||||
RUN echo $SOURCE_COMMIT > REVISION
|
||||
|
||||
RUN buildDeps='libmagic-dev' && \
|
||||
apt-get update && \
|
||||
apt-get install --no-install-recommends -y $buildDeps && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
bundle install --deployment --without development test && \
|
||||
apt-get purge -y --auto-remove $buildDeps && \
|
||||
whenever --update-crontab
|
||||
|
||||
EXPOSE 3000
|
||||
|
|
Loading…
Reference in a new issue