-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
62 lines (56 loc) · 1.98 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
50
51
52
53
54
55
56
57
58
59
60
61
62
ARG DISTRO=alpine
ARG DISTRO_VARIANT=3.21
FROM docker.io/tiredofit/nginx:${DISTRO}-${DISTRO_VARIANT}-6.5.10
LABEL maintainer="Dave Conroy (github.com/tiredofit)"
ARG UPTIMEKUMA_VERSION
ENV UPTIMEKUMA_VERSION=${UPTIMEKUMA_VERSION:-"1.23.16"} \
UPTIMEKUMA_REPO_URL=https://github.com/louislam/uptime-kuma \
NGINX_SITE_ENABLED="uptimekuma" \
NGINX_ENABLE_CREATE_SAMPLE_HTML=FALSE \
NGINX_WORKER_PROCESSES=1 \
IMAGE_NAME="tiredofit/uptimekuma" \
IMAGE_REPO_URL="https://github.com/tiredofit/uptimekuma/"
RUN source assets/functions/00-container && \
set -x && \
addgroup -S -g 8080 uptimekuma && \
adduser -D -S -s /sbin/nologin \
-h /dev/null \
-G uptimekuma \
-g "uptimekuma" \
-u 8080 uptimekuma \
&& \
\
package update && \
package upgrade && \
package install .uptimekuma-build-deps \
git \
npm \
&& \
\
package install .uptimekuma-run-deps \
chromium \
nodejs \
&& \
\
clone_git_repo "${UPTIMEKUMA_REPO_URL}" "${UPTIMEKUMA_VERSION}" && \
if [ -d "/build-assets/src" ] && [ -n "$(ls -A "/build-assets/src" 2>/dev/null)" ]; then cp -R /build-assets/src/* ${GIT_REPO_SRC_UPTIMEKUMA} ; fi; \
if [ -d "/build-assets/scripts" ] && [ -n "$(ls -A "/build-assets/scripts" 2>/dev/null)" ]; then for script in /build-assets/scripts/*.sh; do echo "** Applying $script"; bash $script; done && \ ; fi ; \
mkdir -p /app && \
cp .npmrc /app && \
cp package*.json /app && \
npm ci && \
npm run build && \
cp -R dist db server src /app/ && \
cd /app/ && \
npm ci --omit=dev && \
chown -R uptimekuma:uptimekuma /app && \
\
package remove .uptimekuma-build-deps && \
package cleanup && \
rm -rf \
/build-assets \
/root/.cache \
/root/.npm \
/usr/src/*
EXPOSE 3001
COPY install /