-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
31 lines (24 loc) · 1.02 KB
/
Dockerfile
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
FROM node:14-alpine
EXPOSE 3000
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
# RUN apt update && apt install -y apt-transport-https ca-certificates python sqlite3
# RUN apk add --no-cache g++ git jq make python sqlite sqlite-dev \
# && npm un sqlite3 -S \
# && npm i --production \
# && wget https://github.com/mapbox/node-sqlite3/archive/v5.0.0.zip -O /opt/sqlite3.zip \
# && mkdir -p /opt/sqlite3 \
# && unzip /opt/sqlite3.zip -d /opt/sqlite3 \
# && cd /opt/sqlite3/node-sqlite3-5.0.0 \
# && npm install \
# && ./node_modules/.bin/node-pre-gyp install --fallback-to-build --build-from-source --sqlite=/usr/bin --python=$(which python) \
# && cp -r /opt/sqlite3/node-sqlite3-5.0.0 /usr/src/app/node_modules/sqlite3 \
# && apk del g++ git jq make python \
# && rm -Rf /opt/sqlite3 /opt/sqlite3.zip
# COPY /opt/sqlite3/node-sqlite3-5.0.0 ./node_modules/sqlite3
# COPY package*.json ./
# RUN npm install --unsafe-perm --build-from-source
COPY . /usr/src/app
ENV NODE_ENV production
CMD [ "npm", "start" ]