forked from dwilhelm89/Ethermap
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (34 loc) · 723 Bytes
/
Dockerfile
File metadata and controls
39 lines (34 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM node:16-alpine as build
# build dependencies for imagemin-gifsicle
RUN apk --update --no-cache \
add \
automake \
git \
alpine-sdk \
nasm \
autoconf \
build-base \
zlib \
zlib-dev \
libpng \
libpng-dev\
libwebp \
libwebp-dev \
libjpeg-turbo \
libjpeg-turbo-dev
WORKDIR /usr/src/app
COPY package.json package-lock.json ./
RUN npm install && npm rebuild
COPY bower.json .bowerrc ./
RUN npm exec bower install --allow-root
COPY . ./
RUN npm run build
FROM node:16-alpine
ENV NODE_ENV=production
ENV PORT=8080
WORKDIR /usr/src/app
COPY --from=build /usr/src/app/dist /usr/src/app
# this time, only install prod dependencies
RUN npm install
EXPOSE ${PORT}
CMD [ "node", "server.js" ]