-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.arm64v8
37 lines (26 loc) · 1.07 KB
/
Dockerfile.arm64v8
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
FROM alpine AS builder
# Download QEMU, see https://github.com/docker/hub-feedback/issues/1261
ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v4.0.0%2Bbalena2/qemu-4.0.0.balena2-aarch64.tar.gz
RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1
FROM arm64v8/alpine:3
# Add QEMU
COPY --from=builder qemu-aarch64-static /usr/bin
LABEL maintainer="trion development GmbH <info@trion.de>"
ARG USER_HOME_DIR="/tmp"
ARG APP_DIR="/app"
ARG USER_ID=1000
#reduce logging
ENV NPM_CONFIG_LOGLEVEL=warn CI=true
ENV HOME "$USER_HOME_DIR"
#not declared to avoid anonymous volume leak
#but when not manually bound to host fs, performance will suffer!
#VOLUME "$USER_HOME_DIR/.cache/yarn"
#VOLUME "$APP_DIR/"
WORKDIR $APP_DIR
EXPOSE 4200
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
RUN mkdir -p ${APP_DIR} && chown 1000 ${APP_DIR} && chmod a+w ${APP_DIR} \
&& mkdir -p /tmp/.config && chmod a+w /tmp/.config
RUN apk --no-cache upgrade && apk add --no-cache nodejs npm chromium dumb-init
RUN npm install -g lighthouse @lhci/cli @lhci/server
USER $USER_ID