synclounge/Dockerfile.web

36 lines
1.1 KiB
Docker
Raw Normal View History

# build environment
FROM --platform=$BUILDPLATFORM node:14.13.1-alpine3.12 as build-stage
RUN mkdir /app && chown -R node:node /app
WORKDIR /app
2020-09-19 20:14:33 +00:00
RUN apk add --no-cache python3 make g++
USER node
COPY --chown=node:node package*.json ./
RUN SKIP_BUILD=true npm ci
COPY --chown=node:node . .
ARG SERVERS
ARG VERSION
ARG REVISION
RUN npm run build
# production environment
FROM nginx:1.19.3-alpine as production-stage
LABEL org.opencontainers.image.title="SyncLounge Web"
LABEL org.opencontainers.image.description="Enjoy Plex with your friends. In Sync. Together."
2020-09-28 06:13:54 +00:00
LABEL org.opencontainers.image.url="https://synclounge.tv"
2020-10-08 23:53:16 +00:00
LABEL org.opencontainers.image.source="https://github.com/synclounge/synclounge"
LABEL org.opencontainers.image.vendor="SyncLounge"
LABEL org.opencontainers.image.licenses="MIT"
2020-09-28 06:13:54 +00:00
LABEL org.opencontainers.image.documentation="https://docs.synclounge.tv"
COPY --chown=nginx:nginx --from=build-stage /app/dist /usr/share/nginx/html
ARG VERSION
LABEL org.opencontainers.image.version=$VERSION
ARG REVISION
LABEL org.opencontainers.image.revision=$REVISION
ARG BUILD_DATE
LABEL org.opencontainers.image.created=$BUILD_DATE