feat: update to Debian Trixie
This commit is contained in:
50
dockerfiles/trixie.Dockerfile
Normal file
50
dockerfiles/trixie.Dockerfile
Normal 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" ]
|
Reference in New Issue
Block a user