diff --git a/README.md b/README.md index 6e33f6a..2ea31f2 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ different contents. If both are specified, `--force` takes precedence. * `--max-idle=n` - exit afer *n* seconds of inactivity. Supports [iso 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) and [sleep](https://man7.org/linux/man-pages/man1/sleep.1.html#DESCRIPTION) syntaxes. Uses passenger for now, awaiting [puma](https://github.com/puma/puma/issues/2580) support. * `--nginx` - serve static files via [nginx](https://www.nginx.com/). May require `--root` on some targets to access `/dev/stdout` * `--thruster` - serve static files via [thruster](https://github.com/basecamp/thruster?tab=readme-ov-file#thruster). -* `--no-link` - don't add [--link](https://docs.docker.com/engine/reference/builder/#copy---link) to COPY statements. Some tools (like at the moment, [buildah](https://www.redhat.com/en/topics/containers/what-is-buildah)) don't yet support this feature. +* `--link` - add [--link](https://docs.docker.com/engine/reference/builder/#copy---link) to COPY statements. Some tools (like at the moment, [buildah](https://www.redhat.com/en/topics/containers/what-is-buildah)) don't yet support this feature. * `--no-lock` - don't add linux platforms, set `BUNDLE_DEPLOY`, or `--frozen-lockfile`. May be needed at times to work around a [rubygems bug](https://github.com/rubygems/rubygems/issues/6082#issuecomment-1329756343). * `--sudo` - install and configure sudo to enable `sudo -iu rails` access to full environment diff --git a/lib/generators/dockerfile_generator.rb b/lib/generators/dockerfile_generator.rb index 76549ca..f1612fa 100644 --- a/lib/generators/dockerfile_generator.rb +++ b/lib/generators/dockerfile_generator.rb @@ -17,7 +17,7 @@ class DockerfileGenerator < Rails::Generators::Base "gemfile-updates" => true, "jemalloc" => false, "label" => {}, - "link" => true, + "link" => false, "litefs" => false, "lock" => true, "max-idle" => nil, @@ -117,7 +117,7 @@ class DockerfileGenerator < Rails::Generators::Base class_option :ci, type: :boolean, default: OPTION_DEFAULTS.ci, desc: "include test gems in bundle" - class_option :link, type: :boolean, default: OPTION_DEFAULTS.lock, + class_option :link, type: :boolean, default: OPTION_DEFAULTS.link, desc: "use COPY --link whenever possible" class_option :lock, type: :boolean, default: OPTION_DEFAULTS.lock, diff --git a/test/results/alpine/Dockerfile b/test/results/alpine/Dockerfile index 65fca0c..f22818e 100644 --- a/test/results/alpine/Dockerfile +++ b/test/results/alpine/Dockerfile @@ -41,17 +41,17 @@ RUN curl -sL https://unofficial-builds.nodejs.org/download/release/v${NODE_VERSI rm -rf /tmp/node-v${NODE_VERSION}-linux-x64-musl # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Install node modules -COPY --link package.json yarn.lock ./ +COPY package.json yarn.lock ./ RUN yarn install --frozen-lockfile # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/api/Dockerfile b/test/results/api/Dockerfile index 9c7dbe7..a10bb05 100644 --- a/test/results/api/Dockerfile +++ b/test/results/api/Dockerfile @@ -11,11 +11,11 @@ WORKDIR /rails/my-app ENV NODE_ENV=production # Install node modules -COPY --link my-app/package.json ./ +COPY my-app/package.json ./ RUN npm install # build client application -COPY --link my-app . +COPY my-app . RUN npm run build @@ -43,13 +43,13 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/bin_cd/Dockerfile b/test/results/bin_cd/Dockerfile index b2cafbb..3785802 100644 --- a/test/results/bin_cd/Dockerfile +++ b/test/results/bin_cd/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Adjust binfiles to set current working directory RUN grep -l '#!/usr/bin/env ruby' /rails/bin/* | xargs sed -i '/^#!/aDir.chdir File.expand_path("..", __dir__)' diff --git a/test/results/bun/Dockerfile b/test/results/bun/Dockerfile index 2f9ce9b..da38986 100644 --- a/test/results/bun/Dockerfile +++ b/test/results/bun/Dockerfile @@ -32,17 +32,17 @@ ENV PATH=/usr/local/bun/bin:$PATH RUN curl -fsSL https://bun.sh/install | bash -s -- "bun-v${BUN_VERSION}" # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Install node modules -COPY --link package.json bun.lockb ./ +COPY package.json bun.lockb ./ RUN bun install --frozen-lockfile # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/cache/Dockerfile b/test/results/cache/Dockerfile index 77fee7c..89b4eb0 100644 --- a/test/results/cache/Dockerfile +++ b/test/results/cache/Dockerfile @@ -37,7 +37,7 @@ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz rm -rf /tmp/node-build-master # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN --mount=type=cache,id=bld-gem-cache,sharing=locked,target=/srv/vendor \ bundle config set app_config .bundle && \ bundle config set path /srv/vendor && \ @@ -49,12 +49,12 @@ RUN --mount=type=cache,id=bld-gem-cache,sharing=locked,target=/srv/vendor \ cp -ar /srv/vendor . # Install node modules -COPY --link package.json yarn.lock ./ +COPY package.json yarn.lock ./ RUN --mount=type=cache,id=bld-yarn-cache,target=/root/.yarn \ YARN_CACHE_FOLDER=/root/.yarn yarn install --frozen-lockfile # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/ci/Dockerfile b/test/results/ci/Dockerfile index 55b4089..a08caa5 100644 --- a/test/results/ci/Dockerfile +++ b/test/results/ci/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/config/Dockerfile b/test/results/config/Dockerfile index 874e187..49679a0 100644 --- a/test/results/config/Dockerfile +++ b/test/results/config/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config # Install application gems -COPY Gemfile Gemfile.lock ./ +COPY --link Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY . . +COPY --link . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/env/Dockerfile b/test/results/env/Dockerfile index 85b0826..b18ed59 100644 --- a/test/results/env/Dockerfile +++ b/test/results/env/Dockerfile @@ -30,12 +30,12 @@ ENV AWS_ACCESS_KEY_ID="1" \ AWS_SECRET_ACCESS_KEY="1" # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/esbuild/Dockerfile b/test/results/esbuild/Dockerfile index 49d03fd..e773441 100644 --- a/test/results/esbuild/Dockerfile +++ b/test/results/esbuild/Dockerfile @@ -35,17 +35,17 @@ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz rm -rf /tmp/node-build-master # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Install node modules -COPY --link package.json yarn.lock ./ +COPY package.json yarn.lock ./ RUN yarn install --frozen-lockfile # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/execjs_importmap/Dockerfile b/test/results/execjs_importmap/Dockerfile index 50ee202..ea80461 100644 --- a/test/results/execjs_importmap/Dockerfile +++ b/test/results/execjs_importmap/Dockerfile @@ -41,13 +41,13 @@ RUN apt-get update -qq && \ ENV PATH="/usr/local/node/bin:$PATH" # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/execjs_node/Dockerfile b/test/results/execjs_node/Dockerfile index 84d95fd..29c7d20 100644 --- a/test/results/execjs_node/Dockerfile +++ b/test/results/execjs_node/Dockerfile @@ -45,17 +45,17 @@ RUN npm install -g yarn@$YARN_VERSION ENV PATH="/usr/local/node/bin:$PATH" # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Install node modules -COPY --link package.json yarn.lock ./ +COPY package.json yarn.lock ./ RUN yarn install --frozen-lockfile # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/fullstaq/Dockerfile b/test/results/fullstaq/Dockerfile index 69898f9..5e16448 100644 --- a/test/results/fullstaq/Dockerfile +++ b/test/results/fullstaq/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/grover/Dockerfile b/test/results/grover/Dockerfile index f053ab9..132db50 100644 --- a/test/results/grover/Dockerfile +++ b/test/results/grover/Dockerfile @@ -42,16 +42,16 @@ ENV PATH="/usr/local/node/bin:$PATH" \ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true" # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Install node modules -COPY --link package.json package-lock.json ./ +COPY package.json package-lock.json ./ RUN npm install # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/idle/Dockerfile b/test/results/idle/Dockerfile index 4d809e0..e6d8fc7 100644 --- a/test/results/idle/Dockerfile +++ b/test/results/idle/Dockerfile @@ -36,7 +36,7 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git @@ -44,7 +44,7 @@ RUN bundle install && \ RUN passenger-config build-native-support # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/jemalloc/Dockerfile b/test/results/jemalloc/Dockerfile index c1ca819..db8a39c 100644 --- a/test/results/jemalloc/Dockerfile +++ b/test/results/jemalloc/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/label/Dockerfile b/test/results/label/Dockerfile index a0d276e..fd0321c 100644 --- a/test/results/label/Dockerfile +++ b/test/results/label/Dockerfile @@ -28,12 +28,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/litefs/Dockerfile b/test/results/litefs/Dockerfile index 994cc07..3b55950 100644 --- a/test/results/litefs/Dockerfile +++ b/test/results/litefs/Dockerfile @@ -26,13 +26,13 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ @@ -46,7 +46,7 @@ FROM base # Install, configure litefs COPY --from=flyio/litefs:0.5 /usr/local/bin/litefs /usr/local/bin/litefs -COPY --link config/litefs.yml /etc/litefs.yml +COPY config/litefs.yml /etc/litefs.yml # Install packages needed for deployment RUN apt-get update -qq && \ diff --git a/test/results/minimal/Dockerfile b/test/results/minimal/Dockerfile index d8452ae..a5b731c 100644 --- a/test/results/minimal/Dockerfile +++ b/test/results/minimal/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/mysql/Dockerfile b/test/results/mysql/Dockerfile index 59a94f9..0ce1818 100644 --- a/test/results/mysql/Dockerfile +++ b/test/results/mysql/Dockerfile @@ -26,13 +26,13 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential default-libmysqlclient-dev # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/nginx/Dockerfile b/test/results/nginx/Dockerfile index d35e9ed..655f7fb 100644 --- a/test/results/nginx/Dockerfile +++ b/test/results/nginx/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/no_precompiled_gems/Dockerfile b/test/results/no_precompiled_gems/Dockerfile index ea1321a..c177c79 100644 --- a/test/results/no_precompiled_gems/Dockerfile +++ b/test/results/no_precompiled_gems/Dockerfile @@ -26,13 +26,13 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle config set force_ruby_platform true && \ bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/no_prep/Dockerfile b/test/results/no_prep/Dockerfile index 493d97e..de8c12f 100644 --- a/test/results/no_prep/Dockerfile +++ b/test/results/no_prep/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/parallel/Dockerfile b/test/results/parallel/Dockerfile index 27aecff..c3b6280 100644 --- a/test/results/parallel/Dockerfile +++ b/test/results/parallel/Dockerfile @@ -38,14 +38,14 @@ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz rm -rf /tmp/node-build-master # Install node modules -COPY --link package.json yarn.lock ./ +COPY package.json yarn.lock ./ RUN yarn install --frozen-lockfile FROM prebuild AS build # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git @@ -56,7 +56,7 @@ COPY --from=node /usr/local/node /usr/local/node ENV PATH=/usr/local/node/bin:$PATH # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/postgresql/Dockerfile b/test/results/postgresql/Dockerfile index 9427aa0..f7c6a5a 100644 --- a/test/results/postgresql/Dockerfile +++ b/test/results/postgresql/Dockerfile @@ -26,13 +26,13 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential libpq-dev # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/precompile_defer/Dockerfile b/test/results/precompile_defer/Dockerfile index 459f997..e2cea9d 100644 --- a/test/results/precompile_defer/Dockerfile +++ b/test/results/precompile_defer/Dockerfile @@ -22,12 +22,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/private_gemserver/Dockerfile b/test/results/private_gemserver/Dockerfile index 98a889f..22f4bb6 100644 --- a/test/results/private_gemserver/Dockerfile +++ b/test/results/private_gemserver/Dockerfile @@ -26,7 +26,7 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN --mount=type=secret,id=gemserver_credentials,target=/kaniko/gemserver_credentials \ BUNDLE_GEMS__EXAMPLE__COM="$(cat /kaniko/gemserver_credentials)" && \ export BUNDLE_GEMS__EXAMPLE__COM && \ @@ -34,7 +34,7 @@ RUN --mount=type=secret,id=gemserver_credentials,target=/kaniko/gemserver_creden rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/private_gemserver_with_cache/Dockerfile b/test/results/private_gemserver_with_cache/Dockerfile index fb898c7..e656545 100644 --- a/test/results/private_gemserver_with_cache/Dockerfile +++ b/test/results/private_gemserver_with_cache/Dockerfile @@ -28,7 +28,7 @@ RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN --mount=type=cache,id=bld-gem-cache,sharing=locked,target=/srv/vendor \ --mount=type=secret,id=gemserver_credentials,target=/kaniko/gemserver_credentials \ BUNDLE_GEMS__EXAMPLE__COM="$(cat /kaniko/gemserver_credentials)" && \ @@ -42,7 +42,7 @@ RUN --mount=type=cache,id=bld-gem-cache,sharing=locked,target=/srv/vendor \ cp -ar /srv/vendor . # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/redis/Dockerfile b/test/results/redis/Dockerfile index 4c4c915..fe3040b 100644 --- a/test/results/redis/Dockerfile +++ b/test/results/redis/Dockerfile @@ -26,13 +26,13 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/rmagick/Dockerfile b/test/results/rmagick/Dockerfile index e0b94e1..9542424 100644 --- a/test/results/rmagick/Dockerfile +++ b/test/results/rmagick/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential libmagickwand-dev pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/shrine/Dockerfile b/test/results/shrine/Dockerfile index d8452ae..a5b731c 100644 --- a/test/results/shrine/Dockerfile +++ b/test/results/shrine/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/sidekiq/Dockerfile b/test/results/sidekiq/Dockerfile index eb2a5fe..b919b60 100644 --- a/test/results/sidekiq/Dockerfile +++ b/test/results/sidekiq/Dockerfile @@ -26,13 +26,13 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential libpq-dev # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/solid_queue/Dockerfile b/test/results/solid_queue/Dockerfile index eb2a5fe..b919b60 100644 --- a/test/results/solid_queue/Dockerfile +++ b/test/results/solid_queue/Dockerfile @@ -26,13 +26,13 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential libpq-dev # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/sqlite3/Dockerfile b/test/results/sqlite3/Dockerfile index 4c4c915..fe3040b 100644 --- a/test/results/sqlite3/Dockerfile +++ b/test/results/sqlite3/Dockerfile @@ -26,13 +26,13 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/swap/Dockerfile b/test/results/swap/Dockerfile index f81ef17..7d36d66 100644 --- a/test/results/swap/Dockerfile +++ b/test/results/swap/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/thruster/Dockerfile b/test/results/thruster/Dockerfile index c544430..2b434da 100644 --- a/test/results/thruster/Dockerfile +++ b/test/results/thruster/Dockerfile @@ -26,13 +26,13 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/trilogy/Dockerfile b/test/results/trilogy/Dockerfile index d673f82..46f118d 100644 --- a/test/results/trilogy/Dockerfile +++ b/test/results/trilogy/Dockerfile @@ -26,13 +26,13 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ bundle exec bootsnap precompile --gemfile && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ diff --git a/test/results/vite/Dockerfile b/test/results/vite/Dockerfile index 4038ea9..27e8361 100644 --- a/test/results/vite/Dockerfile +++ b/test/results/vite/Dockerfile @@ -33,16 +33,16 @@ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz rm -rf /tmp/node-build-master # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Install node modules -COPY --link package.json package-lock.json ./ +COPY package.json package-lock.json ./ RUN npm install # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/results/windows/Dockerfile b/test/results/windows/Dockerfile index 8b5007f..b490c0e 100644 --- a/test/results/windows/Dockerfile +++ b/test/results/windows/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Adjust binfiles to be executable on Linux RUN chmod +x bin/* && \ diff --git a/test/results/yjit/Dockerfile b/test/results/yjit/Dockerfile index 72c3d29..f80b8b6 100644 --- a/test/results/yjit/Dockerfile +++ b/test/results/yjit/Dockerfile @@ -26,12 +26,12 @@ RUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential pkg-config # Install application gems -COPY --link Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git # Copy application code -COPY --link . . +COPY . . # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile diff --git a/test/test_config.rb b/test/test_config.rb index 6a6430a..7e440ac 100644 --- a/test/test_config.rb +++ b/test/test_config.rb @@ -5,7 +5,7 @@ class TestConfig < TestBase @rails_options = "--minimal" - @generate_options = "--fullstaq --no-link --force" + @generate_options = "--fullstaq --link --force" def app_setup IO.write "config/dockerfile.yml", @@ -18,7 +18,7 @@ def test_config options = YAML.load_file("config/dockerfile.yml")["options"] assert_equal true, options["yjit"] assert_equal true, options["fullstaq"] - assert_equal false, options["link"] + assert_equal true, options["link"] assert_nil options["jemalloc"] end end