Skip to content

Commit

Permalink
Use ruby 3.1 container images
Browse files Browse the repository at this point in the history
  • Loading branch information
hennevogel committed Mar 15, 2022
1 parent 5579efe commit efdb393
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .circleci/conditional_config.yml
Expand Up @@ -40,17 +40,17 @@ images:
- &backend registry.opensuse.org/obs/server/unstable/containers/containers/openbuildservice/backend:latest

- &frontend_minitest
image: registry.opensuse.org/obs/server/unstable/containers/containers/openbuildservice/frontend-backend:latest
image: registry.opensuse.org/obs/server/unstable/containers/ruby31/containers/openbuildservice/frontend-minitest:latest
<<: *common_frontend_config
environment:
EAGER_LOAD: 1

- &frontend_base
image: registry.opensuse.org/obs/server/unstable/containers/containers/openbuildservice/frontend-base-ci:latest
image: registry.opensuse.org/obs/server/unstable/containers/ruby31/containers/openbuildservice/frontend-base:latest
<<: *common_frontend_config

- &frontend_features
image: registry.opensuse.org/obs/server/unstable/containers/containers/openbuildservice/frontend-base:latest
image: registry.opensuse.org/obs/server/unstable/containers/ruby31/containers/openbuildservice/frontend-features:latest
aliases:
- &restore_bundler_cache
restore_cache:
Expand Down
11 changes: 8 additions & 3 deletions src/api/docker-files/Dockerfile
Expand Up @@ -3,7 +3,7 @@
# contained rails app generating files in the git checkout with
# some strange user...

FROM registry.opensuse.org/obs/server/unstable/containers/containers/openbuildservice/frontend-base
FROM registry.opensuse.org/obs/server/unstable/containers/ruby31/containers/openbuildservice/frontend-features:latest
ARG CONTAINER_USERID

# for lint task
Expand All @@ -27,9 +27,14 @@ RUN chown -R frontend /obs/src/api
USER frontend
WORKDIR /obs/src/api

ENV BUNDLE_BUILD__SASSC=--disable-march-tune-native
# Configure our bundle
RUN bundle config build.ffi --enable-system-libffi; \
bundle config build.nokogiri --use-system-libraries; \
bundle config build.sassc --disable-march-tune-native; \
bundle config build.nio4r --with-cflags='-Wno-return-type'

# Refresh our bundle
RUN export NOKOGIRI_USE_SYSTEM_LIBRARIES=1; bundle install --jobs=3 --retry=3 || bundle install --jobs=3 --retry=3
RUN bundle install --jobs=3 --retry=3

# Run our command
CMD ["foreman", "start", "-f", "Procfile"]
14 changes: 10 additions & 4 deletions src/api/docker-files/Dockerfile.minitest
@@ -1,8 +1,8 @@
# This is just a thin layer on top of the frontend-backend container that makes
# This is just a thin layer on top of the frontend-minitest container that makes
# sure different users can run it without the contained rails app generating
# files in the git checkout with some strange user...

FROM registry.opensuse.org/obs/server/unstable/containers/containers/openbuildservice/frontend-backend
FROM registry.opensuse.org/obs/server/unstable/containers/containers/openbuildservice/frontend-minitest

# Configure our user
ARG CONTAINER_USERID
Expand All @@ -21,8 +21,14 @@ RUN chown -R frontend /obs/src/api
USER frontend
WORKDIR /obs/src/api

# Refresh our bundle
RUN export NOKOGIRI_USE_SYSTEM_LIBRARIES=1; bundle install --jobs=3 --retry=3 || bundle install --jobs=3 --retry=3
# Configure our bundle
RUN bundle config build.ffi --enable-system-libffi; \
bundle config build.nokogiri --use-system-libraries; \
bundle config build.sassc --disable-march-tune-native; \
bundle config build.nio4r --with-cflags='-Wno-return-type'

# Install our bundle
RUN bundle install --jobs=3 --retry=3

CMD ["/bin/bash", "-l"]

0 comments on commit efdb393

Please sign in to comment.