use linuxserver.io base image
This commit is contained in:
parent
d876454638
commit
f1a9191e84
2 changed files with 7 additions and 10 deletions
14
Dockerfile
14
Dockerfile
|
@ -1,7 +1,7 @@
|
|||
# syntax = docker/dockerfile:latest
|
||||
|
||||
# Install dependencies only when needed
|
||||
FROM node:current-alpine AS deps
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.15 AS deps
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
@ -9,9 +9,9 @@ COPY --link package.json pnpm-lock.yaml* ./
|
|||
|
||||
RUN <<EOF
|
||||
set -xe
|
||||
apk add libc6-compat tzdata
|
||||
apk add nodejs npm libc6-compat tzdata
|
||||
apk add --virtual .gyp python3 make g++
|
||||
yarn global add pnpm
|
||||
npm install -g pnpm
|
||||
EOF
|
||||
|
||||
RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store pnpm fetch | grep -v "cross-device link not permitted\|Falling back to copying packages from store"
|
||||
|
@ -27,7 +27,7 @@ COPY . .
|
|||
|
||||
RUN <<EOF
|
||||
set -xe
|
||||
yarn next telemetry disable
|
||||
npm run telemetry
|
||||
mkdir config && echo '-' > config/settings.yaml
|
||||
npm run build
|
||||
EOF
|
||||
|
@ -42,11 +42,6 @@ LABEL org.opencontainers.image.source='https://github.com/benphelps/homepage'
|
|||
LABEL org.opencontainers.image.licenses='Apache-2.0'
|
||||
|
||||
ENV NODE_ENV production
|
||||
ENV PUID 0
|
||||
ENV PGID 0
|
||||
ENV TZ Europe/London
|
||||
|
||||
USER $PUID:$PGID
|
||||
WORKDIR /app
|
||||
|
||||
# Copy files from context (this allows the files to copy before the builder stage is done).
|
||||
|
@ -63,4 +58,5 @@ EXPOSE $PORT
|
|||
HEALTHCHECK --interval=10s --timeout=3s --start-period=20s \
|
||||
CMD wget --no-verbose --tries=1 --spider --no-check-certificate http://localhost:$PORT/api/healthcheck || exit 1
|
||||
|
||||
USER $PUID:$PGID
|
||||
CMD ["node", "server.js"]
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
"lint": "next lint",
|
||||
"telemetry": "next telemetry disable"
|
||||
},
|
||||
"dependencies": {
|
||||
"@headlessui/react": "^1.7.0",
|
||||
|
|
Loading…
Add table
Reference in a new issue