ruby-grape-grape
SUCCESS
5m 54s
History Source
SummaryIterations1Transcript5Dockerfile
01Iteration 1
WRITEWriteFile· step #1
0s
Dockerfile719 chars
text29 lines · 719 chars
ARG RUBY_VERSION=4
FROM ruby:${RUBY_VERSION}-slim

ENV BUNDLE_PATH /usr/local/bundle/gems
ENV LIB_PATH /var/grape

RUN apt-get update && \
    apt-get install -y --no-install-recommends build-essential curl git pkg-config libyaml-dev libjemalloc2 && \
    rm -rf /var/lib/apt/lists/*

RUN gem update --system && gem install bundler

ENV LD_PRELOAD libjemalloc.so.2
ENV MALLOC_CONF dirty_decay_ms:1000,narenas:2,background_thread:true
ENV RUBYOPT --enable-frozen-string-literal --yjit

WORKDIR $LIB_PATH

COPY docker/entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh

COPY . .

RUN bundle check || bundle install

CMD ["rake","spec"]

ENTRYPOINT ["docker-entrypoint.sh"]
WRITEWriteFile· step #2
0s
Dockerfile688 bytes written
text28 lines · 688 chars
FROM ruby:3.2-slim

ENV BUNDLE_PATH /usr/local/bundle/gems
ENV LIB_PATH /var/grape

RUN apt-get update && \
    apt-get install -y --no-install-recommends build-essential curl git pkg-config libyaml-dev libjemalloc2 && \
    rm -rf /var/lib/apt/lists/*

RUN gem update --system && gem install bundler

ENV LD_PRELOAD libjemalloc.so.2
ENV MALLOC_CONF dirty_decay_ms:1000,narenas:2,background_thread:true
ENV RUBYOPT --enable-frozen-string-literal --yjit

WORKDIR $LIB_PATH

COPY docker/entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh

COPY . .

RUN bundle check || bundle install

CMD ["rake","spec"]

ENTRYPOINT ["docker-entrypoint.sh"]
WRITEWriteFile· step #3
0s
.dockerignore73 bytes written
dockerignore8 lines · 73 chars
# Ignore Git and Bundler related stuff
.git
.bundle
log/
tmp/
**/*.rbc
.
VERIFYVerifyBuild· step #4
2m 51s
VerifyBuildsmoke_failed
Concerns: Consider adding a .dockerignore to reduce image context size and avoid copying unnecessary files., Ensure docker-entrypoint.sh properly uses exec to forward signals to the child process; otherwise signals may not propagate correctly.
Smoke [PASS]: cd /var/grape && bundle check
Smoke [PASS]: ruby -v
Smoke [FAIL]: cd /var/grape && bundle exec ruby -e 'begin; require \"grape\"; puts \"grape loaded\"; rescue => e; puts e.class; exit 1; end
  Output: sh: 1: Syntax error: Unterminated quoted string
VERIFYVerifyBuild· step #5
28s
VerifyBuildaccepted
Concerns: LD_PRELOAD uses libjemalloc.so.2 without an absolute path which may fail to preload at runtime; consider using the full path (e.g., /usr/lib/x86_64-linux-gnu/libjemalloc.so.2)., Running tests via rake spec in smoke tests could be brittle if external resources are required; the provided commands mitigate by listing tasks instead of executing the full suite.
Smoke [PASS]: ruby -v
Smoke [PASS]: bundle check
Smoke [PASS]: bundle exec rake -T