Download Dockerfile from ilhamdev/api: direct link, hf CLI and curl.
- Browser
- Download file 467 Bytes
-
https://huggingface.co/spaces/ilhamdev/api/resolve/205d2baba1e60d2655edf91ae2594de8dffed649/Dockerfile
- Command line
-
hf download hf://spaces/ilhamdev/api@205d2baba1e60d2655edf91ae2594de8dffed649/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ilhamdev/api/resolve/205d2baba1e60d2655edf91ae2594de8dffed649/Dockerfile
467 Bytes
| # Gunakan versi spesifik dari node untuk stabilitas | |
| FROM node:18-alpine | |
| # Direktori kerja dalam kontainer | |
| WORKDIR /app | |
| # Install git | |
| RUN apk add --no-cache git | |
| # Salin package.json dan package-lock.json terlebih dahulu untuk manfaatkan caching Docker | |
| COPY package*.json ./ | |
| # Install dependensi | |
| RUN npm install --production | |
| # Salin file dan direktori lainnya ke direktori kerja | |
| COPY . . | |
| # Buka port 7860 | |
| EXPOSE 7860 | |
| # Jalankan aplikasi | |
| CMD ["node", "index.js"] | |