1
0
mirror of https://github.com/TeamPiped/Piped.git synced 2024-12-12 21:30:27 +05:30
Piped/Dockerfile
Sai Karthik 3e82d228dc
Dockerfile: rm EXPOSE
The EXPOSE is inferred from the base image which in this case is nginx

So, we need not expicitely define it. One less layer in final image :)
2023-11-21 20:32:44 +05:30

27 lines
586 B
Docker

FROM node:lts-alpine AS build
WORKDIR /app/
RUN --mount=type=cache,target=/var/cache/apk \
apk add --no-cache \
curl
COPY . .
RUN corepack enable && corepack prepare pnpm@latest --activate
RUN --mount=type=cache,target=/root/.local/share/pnpm \
--mount=type=cache,target=/app/node_modules \
pnpm install --prefer-offline && \
pnpm build && ./localizefonts.sh
FROM nginx:alpine
COPY --from=build /app/dist/ /usr/share/nginx/html/
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY docker/entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]