Create Dockerfile
Browse files- Dockerfile +27 -0
Dockerfile
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM node:lts-alpine AS build
|
2 |
+
|
3 |
+
RUN git clone https://github.com/TeamPiped/Piped.git /app
|
4 |
+
WORKDIR /app/
|
5 |
+
|
6 |
+
RUN --mount=type=cache,target=/var/cache/apk \
|
7 |
+
apk add --no-cache \
|
8 |
+
curl
|
9 |
+
|
10 |
+
COPY . .
|
11 |
+
|
12 |
+
RUN corepack enable && corepack prepare pnpm@latest --activate
|
13 |
+
|
14 |
+
RUN --mount=type=cache,target=/root/.local/share/pnpm \
|
15 |
+
--mount=type=cache,target=/app/node_modules \
|
16 |
+
pnpm install --prefer-offline && \
|
17 |
+
pnpm build && ./localizefonts.sh
|
18 |
+
|
19 |
+
FROM nginxinc/nginx-unprivileged:alpine
|
20 |
+
|
21 |
+
COPY --chown=101:101 --from=build /app/dist/ /usr/share/nginx/html/
|
22 |
+
|
23 |
+
COPY --chown=101:101 docker/nginx.conf /etc/nginx/conf.d/default.conf
|
24 |
+
|
25 |
+
COPY docker/entrypoint.sh /entrypoint.sh
|
26 |
+
|
27 |
+
ENTRYPOINT [ "/entrypoint.sh" ]
|