Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .buildkite/scripts/run_ci_step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ JAVA_VERSION="$(cat .java-version)"
export RUBY_VERSION
export JAVA_VERSION

# The Docker image excludes dev/test gems for a leaner production build.
# CI needs them, so clear the 'without' config before installing.
bundle config unset without

case $1 in
lint)
echo "---- running linter"
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ RUN groupadd -g 451 crawlergroup && \
USER crawleruser
COPY --chown=crawleruser:crawlergroup --chmod=775 . /home/app
WORKDIR /home/app
# Exclude development and test gems from the production image to reduce
# image size and CVE surface area (e.g. rack, rspec, rubocop, pry, etc.)
RUN bundle config set --local without 'development test'
RUN make clean install

# Clean up build dependencies
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.wolfi
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ WORKDIR /home/app
# skip jenv/rbenv setup
ENV IS_DOCKER=1

# Exclude development and test gems from the production image to reduce
# image size and CVE surface area (e.g. rack, rspec, rubocop, pry, etc.)
RUN bundle config set --local without 'development test'
RUN make clean install
# add more directories and files not to be copied to the runtime image from /home/app
RUN rm -rf .git .github .idea .devcontainer .buildkite
Expand Down