8000 Use alpine node image for Dockerfile · supabase/postgres-meta@7aa6aee · GitHub
[go: up one dir, main page]

Skip to content

Commit 7aa6aee

Browse files
ffabsssoedirgo
authored andcommitted
Use alpine node image for Dockerfile
1 parent 12eed99 commit 7aa6aee

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Dockerfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1-
FROM node:14
1+
FROM node:14-alpine as deps
2+
RUN apk add --no-cache bash make git python3
3+
RUN apk add --update alpine-sdk
24
WORKDIR /usr/src/app
35
# Do `npm ci` separately so we can cache `node_modules`
46
# https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
57
COPY package*.json ./
68
RUN npm clean-install
9+
10+
FROM node:14-alpine as build
11+
WORKDIR /usr/src/app
12+
COPY --from=deps /usr/src/app/node_modules ./node_modules
713
COPY . .
814
RUN npm run build:server
15+
16+
FROM node:14-alpine as prod
17+
WORKDIR /usr/src/app
18+
COPY --from=deps /usr/src/app/node_modules ./node_modules
19+
COPY --from=build /usr/src/app/bin ./bin
20+
COPY package.json ./
921
ENV PG_META_PORT=8080
1022
CMD ["npm", "run", "start"]
1123
EXPOSE 8080

0 commit comments

Comments
 (0)
0