Skip to content

Commit 66b3f84

Browse files
committed
feature: docker: npm -> bun
1 parent b4dc880 commit 66b3f84

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

docker/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ WORKDIR /usr/src/app
77

88
COPY package.json /usr/src/app/
99

10-
RUN npm config set package-lock false && \
11-
npm install --production -f && \
12-
npm i gritty && \
13-
npm cache clean --force
10+
RUN curl -fsSL https://bun.com/install | bash && \
11+
export PATH="$PATH:~/.bun/bin" && \
12+
bun i --production --no-save && \
13+
bun i gritty && \
14+
bun pm cache rm
1415

1516
COPY . /usr/src/app
1617

docker/Dockerfile.alpine

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ WORKDIR /usr/src/app
77

88
COPY package.json /usr/src/app/
99

10-
RUN npm config set package-lock false && \
11-
npm install --production -f && \
12-
apk update && \
13-
apk add --no-cache bash make g++ python3 && \
14-
npm i gritty && \
15-
npm cache clean --force && \
10+
RUN apk update && \
11+
apk add --no-cache curl bash make g++ python3 && \
12+
curl -fsSL https://bun.com/install | bash && \
13+
export PATH="$PATH:~/.bun/bin" && \
14+
bun i --no-save --production && \
15+
bun i gritty --no-save && \
16+
bun pm cache rm
1617
apk del make g++ python3 && \
1718
rm -rf /usr/include /tmp/* /var/cache/apk/*
1819

0 commit comments

Comments
 (0)