Update: [CI] Build Docker Image

This commit is contained in:
MengYX
2021-02-08 16:08:06 +08:00
parent 7733fa6ad1
commit 8dc1a66d69
2 changed files with 21 additions and 10 deletions

View File

@@ -1,12 +1,4 @@
FROM node:lts AS builder
COPY . /src
WORKDIR /src
RUN npm ci && \
npm run fix-compatibility && \
npm run build -- --modern
FROM nginx:stable-alpine
FROM --platform=$TARGETPLATFORM nginx:stable-alpine
LABEL org.opencontainers.image.title="Unlock Music"
LABEL org.opencontainers.image.description="Unlock encrypted music file in browser"
@@ -15,4 +7,4 @@ LABEL org.opencontainers.image.source="https://github.com/ix64/unlock-music"
LABEL org.opencontainers.image.licenses="MIT"
LABEL maintainer="MengYX"
COPY --from=builder /src/dist /usr/share/nginx/html
COPY ./dist /usr/share/nginx/html