dockerfile-rails 1.6.10 → 1.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/generators/dockerfile_generator.rb +9 -0
- data/lib/generators/templates/Dockerfile.erb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2166500bf8ebbd97df50dec8e206c6233414fb6310a9369693664fa662927acc
|
4
|
+
data.tar.gz: 751a16215549914f56b91330b5c8168916efe276dc290090ea44ca357d6af66c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32fff3700db3dc21809587ea403e7f8c4ba8fd8ba30321b4f5489419f15b853680dd6ad941b02c17aa0d632451e10a390f9d24f36389cc0a1766019f7a4fcc29
|
7
|
+
data.tar.gz: 8cc6ca30994f5837c9d9728f3c1ee1a0f232fdbc439f345e7827c404e613f46c119a2a2e370f908bba8feb747c9d3a0cbcf55f8f6742657fcc68948823504d5d
|
data/README.md
CHANGED
@@ -97,14 +97,17 @@ Args and environment variables can be tailored to a specific build phase by addi
|
|
97
97
|
* `--root` - run application as root
|
98
98
|
* `--windows` - make Dockerfile work for Windows users that may have set `git config --global core.autocrlf true`
|
99
99
|
* `--private-gemserver-domain=gems.example.com` - set the domain name of your private gemserver. This is used to tell bundler for what domain to use the credentials of a private gemserver provided via a docker secret
|
100
|
+
* `--no-precompiled-gems` - compile all gems instead of using precompiled versions
|
100
101
|
|
101
102
|
### Advanced Customization:
|
102
103
|
|
103
104
|
There may be times where feature detection plus flags just aren't enough. As an example, you may wish to configure and run multiple processes.
|
104
105
|
|
105
106
|
* `--instructions=path` - a dockerfile fragment to be inserted into the final document.
|
106
|
-
* `--
|
107
|
+
* `--migrate=cmd` - a replacement (generally a script) for `db:prepare`/`db:migrate`.
|
108
|
+
* `--no-gemfile-updates` - do not modify my gemfile.
|
107
109
|
* `--procfile=path` - a [Procfile](https://github.com/ddollar/foreman#foreman) to use in place of launching Rails directly.
|
110
|
+
* `--registry=another.docker.registry.com` - use a different registry for sourcing Docker images (e.g. public.ecr.aws).
|
108
111
|
|
109
112
|
Like with environment variables, packages, and build args, `--instructions` can be tailored to a specific build phase by adding `-base`, `-build`, or `-deploy` after the flag name, with the default being `-deploy`.
|
110
113
|
|
@@ -14,6 +14,7 @@ class DockerfileGenerator < Rails::Generators::Base
|
|
14
14
|
"ci" => false,
|
15
15
|
"compose" => false,
|
16
16
|
"fullstaq" => false,
|
17
|
+
"gemfile-updates" => true,
|
17
18
|
"jemalloc" => false,
|
18
19
|
"label" => {},
|
19
20
|
"link" => true,
|
@@ -28,6 +29,7 @@ class DockerfileGenerator < Rails::Generators::Base
|
|
28
29
|
"platform" => nil,
|
29
30
|
"postgresql" => false,
|
30
31
|
"precompile" => nil,
|
32
|
+
"precompiled-gems" => true,
|
31
33
|
"prepare" => true,
|
32
34
|
"private-gemserver-domain" => nil,
|
33
35
|
"procfile" => "",
|
@@ -123,6 +125,9 @@ class DockerfileGenerator < Rails::Generators::Base
|
|
123
125
|
class_option :precompile, type: :string, default: OPTION_DEFAULTS.precompile,
|
124
126
|
desc: 'if set to "defer", assets:precompile will be done at deploy time'
|
125
127
|
|
128
|
+
class_option "precompiled-gems", type: :boolean, default: OPTION_DEFAULTS["precompiled-gems"],
|
129
|
+
desc: "use precompiled gems"
|
130
|
+
|
126
131
|
class_option "bin-cd", type: :boolean, default: OPTION_DEFAULTS["bin-cd"],
|
127
132
|
desc: "modify binstubs to set working directory"
|
128
133
|
|
@@ -219,6 +224,8 @@ class DockerfileGenerator < Rails::Generators::Base
|
|
219
224
|
class_option "private-gemserver-domain", type: :string, default: OPTION_DEFAULTS["private-gemserver-domain"],
|
220
225
|
desc: "domain name of a private gemserver used when installing application gems"
|
221
226
|
|
227
|
+
class_option "gemfile-updates", type: :boolean, default: OPTION_DEFAULTS["gemfile-updates"],
|
228
|
+
desc: "include gemfile updates"
|
222
229
|
|
223
230
|
class_option "add-base", type: :array, default: [],
|
224
231
|
desc: "additional packages to install for both build and deploy"
|
@@ -510,6 +517,8 @@ private
|
|
510
517
|
end
|
511
518
|
|
512
519
|
def install_gems
|
520
|
+
return unless options["gemfile-updates"]
|
521
|
+
|
513
522
|
ENV["BUNDLE_IGNORE_MESSAGES"] = "1"
|
514
523
|
|
515
524
|
gemfile = IO.read("Gemfile")
|
@@ -113,7 +113,7 @@ RUN --mount=type=secret,id=gemserver_credentials,target=/kaniko/gemserver_creden
|
|
113
113
|
bundle install<% if depend_on_bootsnap? && options.precompile != "defer" -%> && \
|
114
114
|
bundle exec bootsnap precompile --gemfile<% end %> && \
|
115
115
|
<% else -%>
|
116
|
-
RUN bundle install<% if depend_on_bootsnap? && options.precompile != "defer" -%> && \
|
116
|
+
RUN <% if options["precompiled-gems"] != true %>bundle config set force_ruby_platform true && \<%= "\n " %><% end %>bundle install<% if depend_on_bootsnap? && options.precompile != "defer" -%> && \
|
117
117
|
bundle exec bootsnap precompile --gemfile<% end %> && \
|
118
118
|
<% end -%>
|
119
119
|
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dockerfile-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|