2021-07-12 20:32:09 -07:00
|
|
|
FROM node:14-alpine3.14
|
2021-07-13 21:42:52 -07:00
|
|
|
WORKDIR /app
|
2021-07-12 20:32:09 -07:00
|
|
|
|
2021-07-13 21:42:52 -07:00
|
|
|
RUN apk add --no-cache make g++ python3 py3-pip python3-dev
|
2021-07-12 20:32:09 -07:00
|
|
|
RUN ln -s /usr/bin/python3 /usr/bin/python
|
2021-07-10 23:20:31 -07:00
|
|
|
|
2021-07-13 21:42:52 -07:00
|
|
|
# split the sqlite install here, so that it can caches the arm prebuilt
|
|
|
|
RUN npm install sqlite3@5.0.2
|
|
|
|
|
2021-07-10 23:20:31 -07:00
|
|
|
COPY . .
|
|
|
|
RUN npm install
|
|
|
|
RUN npm run build
|
|
|
|
|
2021-07-13 08:29:40 -07:00
|
|
|
# Remove built tools
|
|
|
|
RUN apk del make g++
|
|
|
|
|
2021-07-10 23:20:31 -07:00
|
|
|
EXPOSE 3001
|
|
|
|
VOLUME ["/app/data"]
|
|
|
|
CMD ["npm", "run", "start-server"]
|