Files
osem/Dockerfile.production
Henne Vogelsang 6f3111c35d Fix docker shell environment
Move shared variables (nokogiri/path etc.) into the base image.

Fixes #2917
2022-03-01 15:43:23 +01:00

23 lines
530 B
Docker

FROM registry.opensuse.org/opensuse/infrastructure/dale/containers/osem/base:latest
ENV RAILS_ENV=production
# Add our files
COPY --chown=1000:1000 . /osem/
# Install bundler & foreman
RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" /osem/Gemfile.lock | tail -n 1)"; \
gem install foreman
USER osem
WORKDIR /osem/
# Install our bundle
RUN bundle config set --local without 'test development'
RUN bundle install --jobs=3 --retry=3
# Generate assets
RUN bundle exec rake assets:precompile
CMD ["foreman", "start"]