Skip to content

Commit 2377709

Browse files
committed
feat: remove pkg from build process
1 parent e8a619a commit 2377709

File tree

3 files changed

+576
-1789
lines changed

3 files changed

+576
-1789
lines changed

Dockerfile

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,9 @@
22
# Use of this source code is governed by a GNU GPL-style license
33
# that can be found in the LICENSE.md file. All rights reserved.
44

5-
FROM node:lts AS build
6-
RUN npm install -g pkg-fetch
5+
FROM node:lts
76

8-
# Configure, download target Node base binary
9-
ARG targetNode=node16
10-
ARG targetPlatform=alpine
11-
ARG targetArch=x64
12-
RUN pkg-fetch -n ${targetNode} -p ${targetPlatform} -a ${targetArch}
13-
14-
WORKDIR /build
7+
WORKDIR /faucet
158

169
# Install dependencies
1710
COPY package*.json ./
@@ -20,16 +13,6 @@ RUN npm install
2013
# Copy and transpile app src
2114
COPY src ./src
2215
COPY tsconfig.json ./
23-
RUN npm run build:src
24-
25-
# Package binary
26-
RUN npx pkg . \
27-
--target $targetNode-$targetPlatform-$targetArch \
28-
--output bin/faucet
29-
30-
# Copy binary to clean alpine image
31-
FROM alpine:latest
32-
COPY --from=build /build/bin/faucet /usr/local/bin/faucet
16+
RUN npm run build
3317

34-
ENTRYPOINT ["faucet"]
35-
CMD [""]
18+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)