2022-06-15 13:42:44 +03:00
|
|
|
FROM --platform=$BUILDPLATFORM node:17.7-alpine3.14 AS client-builder
|
|
|
|
WORKDIR /ui
|
|
|
|
# cache packages in layer
|
|
|
|
COPY ui/package.json /ui/package.json
|
|
|
|
COPY ui/package-lock.json /ui/package-lock.json
|
|
|
|
RUN --mount=type=cache,target=/usr/src/app/.npm \
|
|
|
|
npm set cache /usr/src/app/.npm && \
|
|
|
|
npm ci
|
|
|
|
# install
|
|
|
|
COPY ui /ui
|
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
FROM alpine
|
|
|
|
LABEL org.opencontainers.image.title="vackup-docker-extension" \
|
|
|
|
org.opencontainers.image.description="My awesome Docker extension" \
|
|
|
|
org.opencontainers.image.vendor="Felipe" \
|
|
|
|
com.docker.desktop.extension.api.version=">= 0.2.3" \
|
|
|
|
com.docker.extension.screenshots="" \
|
|
|
|
com.docker.extension.detailed-description="" \
|
|
|
|
com.docker.extension.publisher-url="" \
|
|
|
|
com.docker.extension.additional-urls="" \
|
|
|
|
com.docker.extension.changelog=""
|
|
|
|
|
|
|
|
COPY metadata.json .
|
|
|
|
COPY docker.svg .
|
|
|
|
COPY --from=client-builder /ui/build ui
|
2022-06-15 16:51:22 +03:00
|
|
|
|
|
|
|
RUN mkdir -p /vackup
|