-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharm64v8.dockerfile
67 lines (53 loc) · 1.59 KB
/
arm64v8.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
63
64
65
66
67
# :: QEMU
FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu
# :: Util
FROM alpine as util
RUN set -ex; \
apk add --no-cache \
git; \
git clone https://github.com/11notes/util.git;
# :: Build
FROM alpine as build
ENV BUILD_VERSION=1.18.7
ADD https://github.com/keeweb/keeweb/releases/download/v${BUILD_VERSION}/KeeWeb-${BUILD_VERSION}.html.zip /tmp
RUN set -ex; \
mkdir -p /opt/keeweb; \
apk --no-cache add \
unzip; \
unzip /tmp/KeeWeb-${BUILD_VERSION}.html.zip -d /opt/keeweb;
# :: Header
FROM --platform=linux/arm64 11notes/nginx:stable
COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin
COPY --from=util /util/docker /usr/local/bin
COPY --from=build /opt/keeweb/ /keeweb/static
ENV APP_ROOT=/keeweb
ENV APP_NAME="keeweb"
ENV APP_VERSION=1.18.7
# :: Run
USER root
# :: update image
RUN set -ex; \
apk --no-cache --update add \
openssl;
# :: prepare image
RUN set -ex; \
mkdir -p \
${APP_ROOT}/etc;
RUN set -ex; \
sed -i 's@(no-config)@/default.json@g' ${APP_ROOT}/static/index.html;
# :: copy root filesystem changes and add execution rights to init scripts
COPY ./rootfs /
RUN set -ex; \
chmod +x -R /usr/local/bin
# :: change home path for existing user and set correct permission
RUN set -ex; \
usermod -d ${APP_ROOT} docker; \
chown -R 1000:1000 \
${APP_ROOT};
# :: Volumes
VOLUME ["${APP_ROOT}/var"]
# :: Monitor
HEALTHCHECK CMD /usr/local/bin/healthcheck.sh || exit 1
# :: Start
USER docker
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]