]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - Dockerfile.arm32v7
Add news as dynamic message
[github/bastienwirtz/homer.git] / Dockerfile.arm32v7
CommitLineData
b9c5fcf0
BW
1# build stage
2FROM node:lts-alpine as build-stage
3
4WORKDIR /app
5
6COPY package*.json ./
e6596ca6 7RUN yarn install --frozen-lockfile
b9c5fcf0
BW
8
9COPY . .
10RUN yarn build
11
12# Multi arch build support
5a5412c5
AZ
13FROM alpine as qemu
14
514b68ea 15ARG QEMU_VERSION="v4.2.0-7"
5a5412c5
AZ
16
17RUN wget https://github.com/multiarch/qemu-user-static/releases/download/${QEMU_VERSION}/qemu-arm-static && chmod +x qemu-arm-static
18
b9c5fcf0 19# production stage
abe6df52
AZ
20FROM arm32v7/alpine:3.11
21
5a5412c5 22COPY --from=qemu qemu-arm-static /usr/bin/
abe6df52
AZ
23
24ENV USER darkhttpd
25ENV GROUP darkhttpd
26ENV GID 911
27ENV UID 911
28
29RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
5a5412c5
AZ
30 apk add -U darkhttpd && \
31 rm /usr/bin/qemu-arm-static
abe6df52 32
ac1442c6 33USER ${USER}
abe6df52 34
d10b219d
CB
35COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
36
0d6a177b 37ENTRYPOINT ["darkhttpd","/www/","--no-listing"]