forked from sciactive/nephele
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (25 loc) · 1.26 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
# syntax=docker/dockerfile:1
FROM node:lts-alpine
LABEL org.opencontainers.image.authors="https://sciactive.com"
LABEL org.opencontainers.image.title="Nephele Serve"
LABEL org.opencontainers.image.description="A WebDAV server."
LABEL org.opencontainers.image.version="1.0.0-alpha.45"
LABEL org.opencontainers.image.url="https://github.com/sciactive/nephele"
LABEL org.opencontainers.image.source="https://github.com/sciactive/nephele"
LABEL org.opencontainers.image.licenses="Apache-2.0"
# Node and PM2 environment variables.
ENV WORKERS=8
ENV NODE_ENV=production
# Nephele environment variables.
ENV SERVER_ROOT=/data/
ENV UPDATE_CHECK=false
VOLUME ["/data"]
RUN npm i -g pm2 [email protected]
EXPOSE 80
EXPOSE 443
CMD pm2-runtime start -i $WORKERS --node-args "--experimental-specifier-resolution=node" nephele-serve -- $SERVER_ROOT
# Note to future Hunter: This is the command to build for both amd64 and arm64 and push to Docker Hub.
# docker buildx build --platform linux/amd64,linux/arm64 -t sciactive/nephele:latest -t sciactive/nephele:1.0.0-alpha.45 --push .
# You need buildx and qemu: https://stackoverflow.com/a/76129784/664915
# sudo dnf install qemu-system-arm qemu-system-aarch64
# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes