Introduces openSUSE based docker-compose environment

This commit is contained in:
Henne Vogelsang 2018-09-05 22:49:57 +02:00 committed by Ana María Martínez Gómez
parent 824d83411d
commit 8fd3004d7f
7 changed files with 126 additions and 50 deletions

24
Dockerfile.production Normal file
View file

@ -0,0 +1,24 @@
FROM osem/base
# 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/
COPY --chown=osem:osem . /osem/
# Install our bundle
RUN export NOKOGIRI_USE_SYSTEM_LIBRARIES=1; bundle install --jobs=3 --retry=3 --without test development
# Configure OSEM
RUN mv config/database.yml.example config/database.yml
ENV RAILS_ENV=production
CMD ["foreman", "start"]