]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - Dockerfile.arm32v7
feat(auth): do not handle redirection in getConfig
[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 23
cab7bfd1
BW
24ENV GID 1000
25ENV UID 1000
481ab9a0 26ENV PORT 8080
cd75da69 27ENV SUBFOLDER "/_"
cab7bfd1 28ENV INIT_ASSETS 1
abe6df52 29
cab7bfd1 30RUN addgroup -S lighttpd -g ${GID} && adduser -D -S -u ${UID} lighttpd lighttpd && \
b6b31e44 31 apk add -U --no-cache lighttpd && \
5a5412c5 32 rm /usr/bin/qemu-arm-static
abe6df52 33
049f8522 34WORKDIR /www
d10b219d 35
049f8522 36COPY lighttpd.conf /lighttpd.conf
cab7bfd1
BW
37COPY entrypoint.sh /entrypoint.sh
38COPY --from=build-stage --chown=${UID}:${GID} /app/dist /www/
39COPY --from=build-stage --chown=${UID}:${GID} /app/dist/assets /www/default-assets
40
41USER ${UID}:${GID}
049f8522 42
220c60cb 43HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
6dd8342b
DV
44 CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1
45
481ab9a0 46EXPOSE ${PORT}
b102c9b2 47VOLUME /www/assets
049f8522
BW
48
49CMD ["lighttpd", "-D", "-f", "/lighttpd.conf"]