From 110bf44a3b54e1fdf3fba0e0299cf0f97146c289 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 8 Feb 2023 10:27:27 +0100 Subject: [PATCH] Recommend single layer --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1adddbfa..b0248223 100644 --- a/README.md +++ b/README.md @@ -253,13 +253,11 @@ This build secret can then be referenced in the Dockerfile: # Copy Gemfiles COPY Gemfile Gemfile.lock ./ -# Install dependencies, including private repositories via access token +# Install dependencies, including private repositories via access token (then remove git configs with exposed GITHUB_TOKEN) RUN --mount=type=secret,id=GITHUB_TOKEN \ BUNDLE_GITHUB__COM=x-access-token:$(cat /run/secrets/GITHUB_TOKEN) \ - bundle install - -# Remove git configs with exposed GITHUB_TOKEN -RUN find /usr/local/bundle/cache/bundler/git -name "config" -delete + bundle install && \ + find /usr/local/bundle/cache/bundler/git -name "config" -delete ``` ### Using command arguments for Traefik