Skip to content

Commit 577bade

Browse files
authored
fix: remove go binaries dependency (#674)
remove go binaries dependency
1 parent aec8102 commit 577bade

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,21 @@ RUN yarn build
1111

1212
###############################################################
1313

14+
FROM golang:1.18 as nodeprune
15+
16+
# Build node-prune from source
17+
RUN go install github.com/tj/node-prune@latest
18+
19+
###############################################################
20+
1421
FROM node:16 as dependencies
1522

1623
ENV NODE_ENV production
1724
COPY package.json yarn.lock ./
1825
RUN yarn --production
1926

20-
RUN curl -sf https://gobinaries.com/tj/node-prune | sh
27+
# Copy node-prune binary built from source
28+
COPY --from=nodeprune /go/bin/node-prune /usr/local/bin/node-prune
2129
RUN node-prune
2230

2331
###############################################################

0 commit comments

Comments
 (0)