-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
50 lines (44 loc) · 1.36 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM docker.io/tiredofit/alpine:3.16
LABEL maintainer="Dave Conroy (github.com/tiredofit)"
### Set Defaults
ENV FORMIO_VERSION=v2.4.1 \
FORMIO_CLIENT_VERSION=master \
CONTAINER_ENABLE_MESSAGING=FALSE \
CONTAINER_ENABLE_SCHEDULING=FALSE \
CONTAINER_NAME=formio-api-app
### Install Runtime Dependencies
RUN set -x && \
sed -i "/www-data/d" /etc/group* && \
addgroup -S -g 82 www-data && \
adduser -D -S -h /app -s /sbin/nologin -G www-data -g "Node" -u 3000 nodejs && \
apk update && \
apk upgrade && \
apk add -t .formio-build-deps \
git \
g++ \
make \
python3 \
&& \
apk add -t .formio-run-deps \
nodejs \
npm \
yarn \
&& \
\
sudo -u nodejs git clone -b $FORMIO_VERSION https://github.com/formio/formio.git /app/ && \
sudo -u nodejs git clone -b $FORMIO_CLIENT_VERSION https://github.com/formio/formio-app-formio.git /app/client && \
\
cd /app && \
sudo -u nodejs npm install && \
sudo -u nodejs npm install sendgrid && \
\
### Misc & Cleanup
mkdir -p /app/templates && \
chown -R nodejs. /app && \
apk del .formio-build-deps && \
rm -rf /tmp/* /var/cache/apk/*
WORKDIR /app/
### Networking Configuration
EXPOSE 3001
### Add Files
COPY install /