-
Notifications
You must be signed in to change notification settings - Fork 60
/
Dockerfile
29 lines (18 loc) · 663 Bytes
/
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
FROM node:18-alpine3.16 AS builder
# Create app directory
WORKDIR /usr/src/app
RUN apk --virtual build-dependencies add \
git libtool curl jq py3-configobj py3-pip py3-setuptools python3 python3-dev g++ make libusb-dev eudev-dev linux-headers && ln -sf python3 /usr/bin/python
RUN ln -s /lib/arm-linux-gnueabihf/libusb-1.0.so.0 libusb-1.0.dll
COPY package*.json ./
COPY yarn.lock ./
# Installing dependencies
RUN yarn cache clean
RUN yarn install --frozen-lockfile --unsafe-perm
RUN yarn add usb
# Copying files from current directory
COPY . .
# Create build and link
RUN yarn build
ENTRYPOINT ["node", "/usr/src/app/dist/index.js"]
CMD ["daemon"]