Skip to content

Commit

Permalink
chore(Dockerfile): bump ruby version
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Mar 16, 2023
1 parent 042f52d commit 860c855
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG RUBY_VER="3.1"
ARG RUBY_VER="3.2"
FROM ruby:$RUBY_VER-alpine AS build-env

ARG PACKAGES="git libxml2 libxslt build-base curl-dev libxml2-dev libxslt-dev zlib-dev tzdata"
ARG PACKAGES="git libxml2 libxslt build-base curl-dev libxml2-dev libxslt-dev zlib-dev tzdata libpq-dev"

RUN apk update && \
apk upgrade && \
Expand All @@ -23,9 +23,9 @@ RUN bundle config --global frozen 1 \
&& bundle install -j4 --retry 3 \
&& bundle binstubs puma --force \
# Remove unneeded files (cached *.gem, *.o, *.c)
&& rm -rf vendor/bundle/ruby/3.1.0/cache/*.gem \
&& find vendor/bundle/ruby/3.1.0/gems/ -name "*.c" -delete \
&& find vendor/bundle/ruby/3.1.0/gems/ -name "*.o" -delete
&& rm -rf vendor/bundle/ruby/3.2.0/cache/*.gem \
&& find vendor/bundle/ruby/3.2.0/gems/ -name "*.c" -delete \
&& find vendor/bundle/ruby/3.2.0/gems/ -name "*.o" -delete

COPY . .

Expand All @@ -43,7 +43,7 @@ WORKDIR $APP_DIR
ENV BUNDLE_APP_CONFIG="$APP_DIR/.bundle"

# install packages
ARG PACKAGES="tzdata libxml2 libxslt libc6-compat"
ARG PACKAGES="tzdata libxml2 libxslt libc6-compat libpq-dev"
RUN apk update \
&& apk upgrade \
&& apk add --update --no-cache $PACKAGES
Expand All @@ -57,6 +57,9 @@ ENV USER=appuser
# See https://stackoverflow.com/a/55757473/12429735RUN
RUN adduser -D -g "" -h "/nonexistent" -s "/sbin/nologin" -H -u "${UID}" "${USER}"
RUN chown appuser:appuser -R /app/tmp

# NOTE:: this should not be used, instead use `RAILS_MASTER_KEY` env var
RUN chown appuser:appuser -R /app/config/
RUN bundle binstubs bundler --force

# Use an unprivileged user.
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ GEM
opentelemetry-instrumentation-active_support (0.3.0)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.21.0)
opentelemetry-instrumentation-all (0.32.0)
opentelemetry-instrumentation-all (0.33.0)
opentelemetry-instrumentation-active_model_serializers (~> 0.19.0)
opentelemetry-instrumentation-aws_sdk (~> 0.3.0)
opentelemetry-instrumentation-bunny (~> 0.19.0)
Expand All @@ -305,7 +305,7 @@ GEM
opentelemetry-instrumentation-ethon (~> 0.20.0)
opentelemetry-instrumentation-excon (~> 0.20.0)
opentelemetry-instrumentation-faraday (~> 0.22.0)
opentelemetry-instrumentation-graphql (~> 0.23.0)
opentelemetry-instrumentation-graphql (~> 0.24.0)
opentelemetry-instrumentation-http (~> 0.21.0)
opentelemetry-instrumentation-http_client (~> 0.21.0)
opentelemetry-instrumentation-koala (~> 0.19.0)
Expand Down Expand Up @@ -358,7 +358,7 @@ GEM
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.21.0)
opentelemetry-instrumentation-graphql (0.23.0)
opentelemetry-instrumentation-graphql (0.24.0)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.21.0)
opentelemetry-instrumentation-http (0.21.0)
Expand Down

0 comments on commit 860c855

Please sign in to comment.