Skip to content

Commit 434588f

Browse files
👷 build: Attempt to reuse layers of Docker images
1 parent d9da1f9 commit 434588f

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

Dockerfile

+1-4
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,7 @@ RUN \
114114
&& chown -R nextjs:nodejs /app /etc/proxychains4.conf
115115

116116
## Production image, copy all the files and run next
117-
FROM scratch
118-
119-
# Copy all the files from app, set the correct permission for prerender cache
120-
COPY --from=app / /
117+
FROM app
121118

122119
ENV NODE_ENV="production" \
123120
NODE_OPTIONS="--dns-result-order=ipv4first --use-openssl-ca" \

Dockerfile.database

+1-4
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,7 @@ RUN \
138138
&& chown -R nextjs:nodejs /app /etc/proxychains4.conf
139139

140140
## Production image, copy all the files and run next
141-
FROM scratch
142-
143-
# Copy all the files from app, set the correct permission for prerender cache
144-
COPY --from=app / /
141+
FROM app
145142

146143
ENV NODE_ENV="production" \
147144
NODE_OPTIONS="--dns-result-order=ipv4first --use-openssl-ca" \

Dockerfile.pglite

+1-4
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,7 @@ RUN \
115115
&& chown -R nextjs:nodejs /app /etc/proxychains4.conf
116116

117117
## Production image, copy all the files and run next
118-
FROM scratch
119-
120-
# Copy all the files from app, set the correct permission for prerender cache
121-
COPY --from=app / /
118+
FROM app
122119

123120
ENV NODE_ENV="production" \
124121
NODE_OPTIONS="--dns-result-order=ipv4first --use-openssl-ca" \

0 commit comments

Comments
 (0)