-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (23 loc) · 708 Bytes
/
Copy pathDockerfile
File metadata and controls
23 lines (23 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM node:18-alpine
WORKDIR /home/gidget
ENV NODE_ENV="production"
# Install system dependencies
RUN apk add --no-cache curl bash git libqrencode build-base g++ autoconf automake libtool libpng libpng-dev jpeg-dev pango-dev cairo-dev giflib-dev gifsicle
RUN npm install -g node-prune
# Installing project dependencies
COPY package.json .
RUN npm i
# Free space
RUN node-prune
RUN apk del git build-base autoconf automake libtool make gcc g++ curl bash \
&& rm -rf /usr/include \
&& rm -rf /var/cache/apk/* /usr/share/man /tmp/*
# Copying bot code
COPY . .
# Testing
RUN npm test
# Exposing private API
ENV PORT=8080
EXPOSE 8080
# CMD ["node", "--experimental-json-modules", "."]
CMD ["npm", "start"]