switch to Debian bookworn Ruby image
All checks were successful
Gitea Actions Demo / lint (push) Successful in 21s
Gitea Actions Demo / test (push) Successful in 12s
Gitea Actions Demo / docker (push) Successful in 2m7s

This commit is contained in:
Ryan Cavicchioni 2025-04-20 12:23:00 -05:00
parent 42e6830cca
commit 89367e3169
Signed by: ryanc
SSH Key Fingerprint: SHA256:KbXiwUnZnHFwFtt3Bytd+F3FN9pPHn1Z1cxMIE1TPbg

View File

@ -1,19 +1,19 @@
FROM ruby:alpine AS base
ARG RUBY_VERSION="3.4.3"
FROM ruby:${RUBY_VERSION} AS base
WORKDIR /app
RUN <<EOT
apt-get update
gem update --system --no-document
gem install -N bundler
apk update
apk upgrade --no-cache
EOT
FROM base AS build
RUN <<EOT
apk add gcc musl-dev ruby-dev make
apt-get install --yes gcc make
EOT
COPY Gemfile* .
@ -27,14 +27,14 @@ EOT
FROM base
# RUN useradd ruby --home /app --shell /bin/sh
RUN adduser ruby -h /app -D
RUN useradd --home /app --create-home app
USER ruby:ruby
USER app:app
COPY --from=build /usr/local/bundle /usr/local/bundle
COPY --from=build --chown=ruby:ruby /app /app
COPY --from=build --chown=app:app /app /app
COPY --chown=ruby:ruby . .
COPY --chown=app:app . .
EXPOSE 4567
CMD [ "bundle", "exec", "rackup", "--host", "0.0.0.0", "--port", "4567" ]