Spaces:
Running
Running
Download Dockerfile from node-user1/ncp: direct link, hf CLI and curl.
- Browser
- Download file 486 Bytes
-
https://huggingface.co/spaces/node-user1/ncp/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/node-user1/ncp/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/node-user1/ncp/resolve/main/Dockerfile
486 Bytes
| # Menggunakan image Node.js yang lebih stabil | |
| FROM node:16-slim | |
| # Tentukan direktori kerja di dalam container | |
| WORKDIR /app | |
| # Salin file package.json dan package-lock.json terlebih dahulu | |
| COPY package*.json ./ | |
| # Install dependensi Node.js | |
| RUN npm install | |
| # Salin seluruh kode aplikasi ke dalam container | |
| COPY . . | |
| # Ekspose port 3000 yang akan digunakan aplikasi Express | |
| EXPOSE 3000 | |
| # Tentukan perintah untuk menjalankan aplikasi Express.js | |
| CMD ["npm", "start"] |