Move bundle installation to entrypoint script

Makes it one step less you have to do in the dev-env setup.
This commit is contained in:
Henne Vogelsang 2018-09-12 21:20:30 +02:00
parent f69bb18e79
commit a452257b9a
No known key found for this signature in database
GPG key ID: 9D6164C2955FADE0
3 changed files with 18 additions and 25 deletions

View file

@ -4,19 +4,8 @@ ARG CONTAINER_USERID
# Configure our user
RUN usermod -u $CONTAINER_USERID osem
# We copy the Gemfiles into this intermediate build stage so it's checksum
# changes and all the subsequent stages (a.k.a. the bundle install call below)
# have to be rebuild. Otherwise, after the first build of this image,
# docker would use it's cache for this and the following stages.
COPY Gemfile /osem/
COPY Gemfile.lock /osem/
RUN chown -R osem /osem
# Add our files
USER osem
WORKDIR /osem/
# Install our bundle
RUN export NOKOGIRI_USE_SYSTEM_LIBRARIES=1; bundle install --jobs=3 --retry=3
CMD ["/osem/bin/osem-init.sh"]
CMD ["foreman", "start"]