3 Commits

Author SHA1 Message Date
2143074952 test
Some checks failed
Gitea Actions Demo / lint (push) Successful in 23s
Gitea Actions Demo / test (push) Successful in 12s
Gitea Actions Demo / docker (push) Failing after 2m41s
2025-04-30 22:14:21 -05:00
4fd8dd78ef use jemalloc
Some checks failed
Gitea Actions Demo / lint (push) Successful in 24s
Gitea Actions Demo / test (push) Successful in 15s
Gitea Actions Demo / docker (push) Has been cancelled
2025-04-30 21:51:49 -05:00
16139755e5 remove old Dockerfile 2025-04-30 21:04:19 -05:00
5 changed files with 11 additions and 43 deletions

View File

@ -144,6 +144,10 @@ jobs:
cwd://${{ steps.meta.outputs.bake-file }}
cwd://${{ steps.meta-alpine.outputs.bake-file }}
- name: Test
run: |
docker run --rm kubernaut:latest
- name: Setup Helm
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0

View File

@ -1,42 +0,0 @@
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
EOT
FROM base AS build
RUN <<EOT
apt-get install --yes gcc make
EOT
COPY Gemfile* .
RUN <<EOT
bundle config set --local without development
bundle install
EOT
FROM base
ENV PORT=4567
# RUN useradd ruby --home /app --shell /bin/sh
RUN useradd --home /app --create-home app
USER app:app
COPY --from=build /usr/local/bundle /usr/local/bundle
COPY --from=build --chown=app:app /app /app
COPY --chown=app:app . .
EXPOSE 4567
CMD [ "puma", "--bind", "0.0.0.0", "--port", "$PORT" ]

View File

@ -5,7 +5,7 @@ WORKDIR /kubernaut
RUN <<EOT
apk update -q
apk add bash
apk add bash jemalloc
rm -rf /var/cache/apk
gem update --system --no-document
gem install -N bundler

View File

@ -5,6 +5,7 @@ WORKDIR /kubernaut
RUN <<EOT
apt-get update -qq
apt-get install --yes --no-install-recommends libjemalloc2
rm -rf /var/lib/apt/lists /var/cache/apt/archives
gem update --system --no-document
gem install -N bundler

View File

@ -7,4 +7,9 @@ ruby --version
printf "rubygems %s\n" "$(gem --version)"
bundle version
if [ -z "${LD_PRELOAD+x}" ]; then
LD_PRELOAD="$(find /usr/lib -name libjemalloc.so.2 -print -quit)"
export LD_PRELOAD
fi
exec "${@}"