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
|
.sass-cache
|
||||||
log
|
log
|
||||||
config/database.yml
|
config/database.yml
|
||||||
|
doc
|
||||||
public/assets
|
public/assets
|
||||||
public/system
|
public/system
|
||||||
tmp/*
|
tmp/*
|
||||||
|
|
16
Dockerfile
16
Dockerfile
|
@ -1,11 +1,7 @@
|
||||||
FROM ruby:2.3
|
FROM ruby:2.3
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install --no-install-recommends -y \
|
apt-get install --no-install-recommends -y cron && \
|
||||||
cron \
|
|
||||||
libv8-dev \
|
|
||||||
libmagic-dev \
|
|
||||||
libmysqlclient-dev && \
|
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
|
||||||
|
@ -13,8 +9,14 @@ ENV RAILS_ENV=production
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN echo $SOURCE_COMMIT > REVISION && \
|
RUN echo $SOURCE_COMMIT > REVISION
|
||||||
bundle install --without development --without test && \
|
|
||||||
|
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
|
whenever --update-crontab
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
Loading…
Reference in a new issue