Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt Dockerfile to osem/base changes #3479

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM registry.opensuse.org/opensuse/infrastructure/dale/containers/osem/base:latest
ARG CONTAINER_USERID
ARG CONTAINER_USERID=1000

# Configure our user
RUN usermod -u $CONTAINER_USERID osem
Expand All @@ -8,19 +8,16 @@ RUN usermod -u $CONTAINER_USERID osem
# 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/
ADD Gemfile /osem/Gemfile
ADD Gemfile.lock /osem/Gemfile.lock
RUN chown -R osem /osem

# Continue as user
WORKDIR /osem
USER osem
WORKDIR /osem/

# Install our bundle
RUN bundle config set --local path 'vendor/bundle'; \
bundle install --jobs=4 --retry=3

# Install our process manager
RUN sudo gem install foreman
# Install our bundle & process manager
RUN bundle install --jobs=3 --retry=3; \
gem install foreman

# Run our command
CMD ["foreman", "start"]