Spaces:
Sleeping
Sleeping
Download Dockerfile from akborana4/test: direct link, hf CLI and curl.
- Browser
- Download file 870 Bytes
-
https://huggingface.co/spaces/akborana4/test/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/akborana4/test/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/akborana4/test/resolve/main/Dockerfile
870 Bytes
| # ---------- 1) Build the React client ---------- | |
| FROM node:18-alpine AS client | |
| WORKDIR /app/client | |
| COPY client/package.json ./ | |
| RUN npm install | |
| COPY client/ ./ | |
| RUN npm run build | |
| # ---------- 2) Build the Node server ---------- | |
| FROM node:18-alpine AS server | |
| WORKDIR /app/server | |
| # Install yt-dlp and Python | |
| RUN addgroup -g 1001 -S nodejs && \ | |
| adduser -S nextjs -u 1001 && \ | |
| apk add --no-cache curl python3 py3-pip && \ | |
| curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp \ | |
| -o /usr/local/bin/yt-dlp && \ | |
| chmod a+rx /usr/local/bin/yt-dlp | |
| # Install server dependencies | |
| COPY server/package.json ./ | |
| RUN npm install | |
| # Copy server source | |
| COPY server/ ./ | |
| # Bring in built client | |
| RUN mkdir -p ../client/dist | |
| COPY --from=client /app/client/dist ../client/dist | |
| ENV NODE_ENV=production | |
| ENV PORT=3000 | |
| EXPOSE 3000 | |
| CMD ["npm", "start"] | |