Skip to content
Closed
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: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ ARG BUNDLER_V1_VERSION=1.17.3
ARG BUNDLER_V2_VERSION=2.3.14
ENV BUNDLE_SILENCE_ROOT_WARNING=1
# Allow gem installs as the dependabot user
ENV BUNDLE_PATH=".bundle" \
BUNDLE_BIN=".bundle/bin"
ENV PATH="$BUNDLE_BIN:$PATH:$BUNDLE_PATH/bin"
ENV BUNDLE_PATH=".bundle"

# Install Ruby, update RubyGems, and install Bundler
RUN mkdir -p /tmp/ruby-install \
Expand Down
27 changes: 17 additions & 10 deletions Dockerfile.development
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,23 @@ COPY --chown=dependabot:dependabot nuget/Gemfile nuget/dependabot-nuget.gemspec
COPY --chown=dependabot:dependabot python/Gemfile python/dependabot-python.gemspec ${CODE_DIR}/python/
COPY --chown=dependabot:dependabot pub/Gemfile pub/dependabot-pub.gemspec ${CODE_DIR}/pub/
COPY --chown=dependabot:dependabot terraform/Gemfile terraform/dependabot-terraform.gemspec ${CODE_DIR}/terraform/
RUN GREEN='\033[0;32m'; NC='\033[0m'; \
for d in `find ${CODE_DIR} -type f -mindepth 2 -maxdepth 2 \
-not -path "${CODE_DIR}/common/Gemfile" \
-name 'Gemfile' | xargs dirname`; do \
echo && \
echo "---------------------------------------------------------------------------" && \
echo "Installing gems for ${GREEN}$(realpath --relative-to=${CODE_DIR} $d)${NC}..." && \
echo "---------------------------------------------------------------------------" && \
cd $d && bundle install; \
done

RUN cd bundler && bundle config path ${CODE_DIR}/common/.bundle
RUN cd cargo && bundle config path ${CODE_DIR}/common/.bundle
RUN cd composer && bundle config path ${CODE_DIR}/common/.bundle
RUN cd docker && bundle config path ${CODE_DIR}/common/.bundle
RUN cd elm && bundle config path ${CODE_DIR}/common/.bundle
RUN cd git_submodules && bundle config path ${CODE_DIR}/common/.bundle
RUN cd github_actions && bundle config path ${CODE_DIR}/common/.bundle
RUN cd go_modules && bundle config path ${CODE_DIR}/common/.bundle
RUN cd gradle && bundle config path ${CODE_DIR}/common/.bundle
RUN cd hex && bundle config path ${CODE_DIR}/common/.bundle
RUN cd maven && bundle config path ${CODE_DIR}/common/.bundle
RUN cd npm_and_yarn && bundle config path ${CODE_DIR}/common/.bundle
RUN cd nuget && bundle config path ${CODE_DIR}/common/.bundle
RUN cd python && bundle config path ${CODE_DIR}/common/.bundle
RUN cd pub && bundle config path ${CODE_DIR}/common/.bundle
RUN cd terraform && bundle config path ${CODE_DIR}/common/.bundle
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do this, I can condense this to a single layer, just wanted to put a proof of concept out quickly.


COPY --chown=dependabot:dependabot omnibus/Gemfile omnibus/dependabot-omnibus.gemspec ${CODE_DIR}/omnibus/
RUN cd omnibus \
Expand Down