2021-10-11 13:43:12 +02:00
|
|
|
FROM registry.opensuse.org/opensuse/infrastructure/dale/containers/osem/base:latest
|
2018-09-05 22:49:57 +02:00
|
|
|
ARG CONTAINER_USERID
|
2017-03-25 22:51:21 +01:00
|
|
|
|
2018-09-05 22:49:57 +02:00
|
|
|
# Configure our user
|
|
|
|
|
RUN usermod -u $CONTAINER_USERID osem
|
2017-03-25 22:51:21 +01:00
|
|
|
|
2018-09-05 22:49:57 +02:00
|
|
|
# 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.
|
2017-03-25 22:51:21 +01:00
|
|
|
COPY Gemfile /osem/
|
|
|
|
|
COPY Gemfile.lock /osem/
|
2018-09-05 22:49:57 +02:00
|
|
|
RUN chown -R osem /osem
|
2017-12-04 13:25:39 +01:00
|
|
|
|
2022-02-10 16:53:26 +01:00
|
|
|
# Continue as user
|
2017-03-25 22:51:21 +01:00
|
|
|
USER osem
|
2018-09-05 22:49:57 +02:00
|
|
|
WORKDIR /osem/
|
2017-03-25 22:51:21 +01:00
|
|
|
|
2018-09-05 22:49:57 +02:00
|
|
|
# Install our bundle
|
2022-02-10 16:53:26 +01:00
|
|
|
RUN bundle install --jobs=3 --retry=3
|
2017-08-28 20:02:55 +02:00
|
|
|
|
2018-09-05 22:49:57 +02:00
|
|
|
CMD ["foreman", "start"]
|