-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (26 loc) · 781 Bytes
/
Dockerfile
File metadata and controls
31 lines (26 loc) · 781 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
FROM node:14.17.2-alpine3.13
# Patch container
RUN apk --update-cache upgrade
# Install dependencies first
RUN apk add zip
RUN apk add libcap
# Give nodejs ability to listen to port 80
RUN setcap 'cap_net_bind_service=+ep' /usr/local/bin/node
# Add service user
RUN adduser fusebit -D
USER fusebit
# Set working directory
WORKDIR /home/fusebit/
ADD --chown=fusebit package.json ./
ADD --chown=fusebit tsconfig.json ./
ADD --chown=fusebit yarn.lock ./
ADD --chown=fusebit .yarnrc ./
ADD --chown=fusebit .yarn/releases/yarn-1.21.1.cjs ./.yarn/releases/yarn-1.21.1.cjs
ADD --chown=fusebit api ./api
ADD --chown=fusebit lib ./lib
ADD --chown=fusebit tool ./tool
ADD --chown=fusebit sdk ./sdk
RUN yarn setup
RUN yarn build function-api
EXPOSE 3001
CMD ["node", "api/function-api"]