diff --git a/Dockerfile b/Dockerfile index 255b45f88..065135bb8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,38 +1,62 @@ -FROM node:16-alpine AS base -LABEL org.opencontainers.image.title "Homepage" -LABEL org.opencontainers.image.description "A self-hosted services landing page, with docker and service integrations." -LABEL org.opencontainers.image.url="https://github.com/benphelps/homepage" -LABEL org.opencontainers.image.documentation='https://github.com/benphelps/homepage/wiki' -LABEL org.opencontainers.image.source='https://github.com/benphelps/homepage' -LABEL org.opencontainers.image.licenses='Apache-2.0' +# syntax = docker/dockerfile:latest # Install dependencies only when needed FROM node:16-alpine AS deps -RUN apk add --no-cache libc6-compat -RUN apk add --no-cache --virtual .gyp python3 make g++ + WORKDIR /app -COPY package.json pnpm-lock.yaml* ./ -RUN yarn global add pnpm -RUN pnpm install -RUN apk del .gyp + +COPY --link package.json pnpm-lock.yaml* ./ + +RUN --mount=type=cache,id=apk,sharing=locked,target=/var/cache/apk \ + <