feat: update to Debian Trixie
All checks were successful
Ruby Lint / lint (push) Successful in 1m34s
Ruby Test / test (push) Successful in 14s

This commit is contained in:
2025-08-14 22:28:47 -05:00
parent 6c90b7c3fb
commit 19dbc725de
2 changed files with 53 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
group "default" {
targets = [ "bookworm", "alpine" ]
targets = [ "trixie", "alpine" ]
}
target "docker-metadata-action" {}
@@ -15,8 +15,8 @@ target "_common" {
]
}
target "bookworm" {
dockerfile = "./dockerfiles/bookworm.Dockerfile"
target "trixie" {
dockerfile = "./dockerfiles/trixie.Dockerfile"
inherits = [ "_common", "docker-metadata-action" ]
}

View File

@@ -0,0 +1,50 @@
ARG RUBY_VERSION="3.4.4"
ARG BASE_REGISTRY="docker.io"
ARG DEBIAN_VERSION="trixie"
FROM ${BASE_REGISTRY}/ruby:${RUBY_VERSION}-slim-${DEBIAN_VERSION} AS base
ENV RACK_ENV="production" \
BUNDLE_DEPLOYMENT=true \
BUNDLE_PATH="/usr/local/bundle" \
BUNDLE_WITHOUT="development test" \
RUBY_YJIT_ENABLE=true
WORKDIR /kubernaut
RUN \
apt-get update -qq && \
apt-get install --yes --no-install-recommends libjemalloc2 && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives
FROM base AS build
RUN \
apt-get update -qq && \
apt-get install --yes --no-install-recommends build-essential && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives
COPY Gemfile Gemfile.lock ./
RUN \
bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git
COPY . .
FROM base
ENV PORT=4567
RUN \
groupadd --system --gid 666 kubernaut && \
useradd --system --uid 666 --gid kubernaut --create-home --shell /bin/bash kubernaut
COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}"
COPY --from=build /kubernaut /kubernaut
USER kubernaut:kubernaut
EXPOSE $PORT
ENTRYPOINT [ "/kubernaut/dockerfiles/entrypoint.sh" ]
CMD [ "bundle", "exec", "puma" ]