dockerfile-rails 1.5.8 → 1.5.9
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa278e91ec05725efb320caaecd9ca2cde617166b4ad4157f7103eeccecf4961
|
4
|
+
data.tar.gz: 748f841c1ba25cfa9f126c056a97e6eb9f6e854ea937f0e7c3a93756992746ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6af2d5008690de608fb72d114c59a3a4a56ff7348be8d4a3c8f21243e3a5e002bd53341297ccaece8191c9e53312b080af973e382dc62b698bb0f7e4832cb188
|
7
|
+
data.tar.gz: c87bbb4eee23e9a5c2dc63d297308edc16df2baf42ea68640df6edca33537ed2acd195a0b49438b6d857c26a8812ad0c19809b8e129d0645e80f6e604a3d0553
|
@@ -577,7 +577,11 @@ private
|
|
577
577
|
# node support, including support for building native modules
|
578
578
|
if using_node?
|
579
579
|
packages += %w(node-gyp pkg-config)
|
580
|
-
|
580
|
+
|
581
|
+
unless using_execjs? || using_puppeteer?
|
582
|
+
packages << "curl"
|
583
|
+
packages << "unzip" if using_bun?
|
584
|
+
end
|
581
585
|
|
582
586
|
# module build process depends on Python, and debian changed
|
583
587
|
# how python is installed with the bullseye release. Below
|
@@ -961,8 +965,8 @@ private
|
|
961
965
|
|
962
966
|
|
963
967
|
def bun_version
|
964
|
-
version = `bun --version`[/\d+\.\d+\.\d+/]
|
965
|
-
version ||= `npm show bun version`[/\d+\.\d+\.\d+/]
|
968
|
+
version = `bun --version`[/\d+\.\d+\.\d+/] rescue nil
|
969
|
+
version ||= `npm show bun version`[/\d+\.\d+\.\d+/] rescue nil
|
966
970
|
|
967
971
|
version
|
968
972
|
end
|
@@ -58,15 +58,18 @@ FROM base as <%= parallel? ? 'pre' : '' %>build
|
|
58
58
|
|
59
59
|
<% if parallel? -%>
|
60
60
|
|
61
|
-
FROM prebuild as node
|
61
|
+
FROM prebuild as <% if using_bun? %>bun<% else %>node<% end %>
|
62
62
|
|
63
63
|
<% end -%>
|
64
|
-
<% if
|
64
|
+
<% if using_bun? and (!using_execjs? || File.exist?('bun.lockb')) -%>
|
65
|
+
<%= render partial: 'install_node', locals: {bun_version: using_execjs? ? nil : bun_version} %>
|
66
|
+
|
67
|
+
<% elsif using_node? and (!using_execjs? || File.exist?('yarn.lock')) -%>
|
65
68
|
<%= render partial: 'install_node', locals: {node_version: using_execjs? ? nil : node_version, yarn_version: File.exist?('yarn.lock') ? yarn_version : nil} %>
|
66
69
|
|
67
70
|
<% end -%>
|
68
71
|
<% if parallel? -%>
|
69
|
-
<%= render partial: 'npm_install', locals: {sources:
|
72
|
+
<%= render partial: 'npm_install', locals: {sources: Dir[*%w(package.json yarn.lock bun.lockb)]} %>
|
70
73
|
|
71
74
|
|
72
75
|
FROM prebuild as build
|
@@ -122,10 +125,17 @@ RUN passenger-config build-native-support
|
|
122
125
|
|
123
126
|
<% end -%>
|
124
127
|
<% if parallel? -%>
|
128
|
+
<% if using_bun? -%>
|
129
|
+
# Copy bun modules
|
130
|
+
COPY --from=bun /rails/node_modules /rails/node_modules
|
131
|
+
COPY --from=bun /usr/local/bun /usr/local/bun
|
132
|
+
ENV PATH=/usr/local/bun/bin:$PATH
|
133
|
+
<% else -%>
|
125
134
|
# Copy node modules
|
126
135
|
COPY --from=node /rails/node_modules /rails/node_modules
|
127
136
|
COPY --from=node /usr/local/node /usr/local/node
|
128
137
|
ENV PATH=/usr/local/node/bin:$PATH
|
138
|
+
<% end -%>
|
129
139
|
|
130
140
|
<% elsif using_node? -%>
|
131
141
|
<%= render partial: 'npm_install', locals: {sources: Dir[*%w(.npmrc .yarnrc package.json package-lock.json yarn.lock bun.lockb)]} %>
|
@@ -1,3 +1,12 @@
|
|
1
|
+
<% if using_bun? -%>
|
2
|
+
# Install Bun
|
3
|
+
<% if bun_version -%>
|
4
|
+
ARG BUN_VERSION=<%= bun_version %>
|
5
|
+
<% end -%>
|
6
|
+
ENV BUN_INSTALL=/usr/local/bun
|
7
|
+
ENV PATH=/usr/local/bun/bin:$PATH
|
8
|
+
RUN curl -fsSL https://bun.sh/install | bash<% if bun_version %> -s -- "bun-v${BUN_VERSION}"<% end %>
|
9
|
+
<% else -%>
|
1
10
|
<% if node_version and yarn_version -%>
|
2
11
|
# Install JavaScript dependencies
|
3
12
|
<% elsif node_version -%>
|
@@ -8,23 +17,14 @@
|
|
8
17
|
<% if node_version && node_version != 'lts' -%>
|
9
18
|
ARG NODE_VERSION=<%= node_version %>
|
10
19
|
<% end -%>
|
11
|
-
<% if using_bun? -%>
|
12
|
-
<% if bun_version -%>
|
13
|
-
ARG BUN_VERSION=<%= bun_version %>
|
14
|
-
<% end -%>
|
15
|
-
<% else -%>
|
16
20
|
<% if yarn_version -%>
|
17
21
|
ARG YARN_VERSION=<%= yarn_version %>
|
18
22
|
<% end -%>
|
19
|
-
<% end -%>
|
20
23
|
<% if node_version && node_version != 'lts' -%>
|
21
24
|
ENV PATH=/usr/local/node/bin:$PATH
|
22
25
|
RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
|
23
26
|
/tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \
|
24
27
|
<% end -%>
|
25
|
-
<% if using_bun? -%>
|
26
|
-
npm install -g bun<% if bun_version %>@$BUN_VERSION<% end %> && \
|
27
|
-
<% else -%>
|
28
28
|
<% if yarn_version -%>
|
29
29
|
<% if yarn_version < '2' -%>
|
30
30
|
<% if node_version -%> <% else %>RUN<% end %> npm install -g yarn@$YARN_VERSION<% if node_version -%> && \<% end %>
|
@@ -37,7 +37,7 @@ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz
|
|
37
37
|
corepack prepare yarn@$YARN_VERSION --activate<% if node_version -%> && \<% end %>
|
38
38
|
<% end -%>
|
39
39
|
<% end -%>
|
40
|
-
<% end -%>
|
41
40
|
<% if node_version -%>
|
42
41
|
rm -rf /tmp/node-build-master
|
43
42
|
<% end -%>
|
43
|
+
<% end -%>
|
@@ -3,14 +3,13 @@ COPY<% if options.link? %> --link<% end %> <%= sources.join(' ') %> ./
|
|
3
3
|
<% if sources.join.include?('.yarnrc') && !Dir['.yarn/releases/*'].empty? -%>
|
4
4
|
COPY<% if options.link? %> --link<% end %> .yarn/releases/* .yarn/releases/
|
5
5
|
<% end -%>
|
6
|
-
<% if
|
7
|
-
RUN <% if options.cache?
|
8
|
-
|
6
|
+
<% if using_bun? -%>
|
7
|
+
RUN <% if options.cache? %>--mount=type=cache,id=bld-bun-cache,target=/root/.bun \
|
8
|
+
<% end %>bun install<% if options.lock? %> --frozen-lockfile<% end %>
|
9
|
+
<% elsif sources.join.include? 'yarn' -%>
|
10
|
+
RUN <% if options.cache? %>--mount=type=cache,id=bld-yarn-cache,target=/root/.yarn \
|
11
|
+
YARN_CACHE_FOLDER=/root/.yarn <% end %>yarn install<% if options.lock? %> --frozen-lockfile<% end %>
|
9
12
|
<% else -%>
|
10
|
-
<% if options.cache?
|
11
|
-
|
12
|
-
npm install
|
13
|
-
<% else -%>
|
14
|
-
RUN npm install
|
15
|
-
<% end -%>
|
13
|
+
RUN <% if options.cache? %>--mount=type=cache,id=bld-npm-cache,target=/root/.npm \
|
14
|
+
<% end %>npm install
|
16
15
|
<% end -%>
|
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.5.
|
4
|
+
version: 1.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|