Download Dockerfile from CieLZ/testing: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/CieLZ/testing/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/CieLZ/testing/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/CieLZ/testing/resolve/main/Dockerfile
1.01 kB
| # Gunakan node image sebagai dasar | |
| FROM node:20-slim | |
| # Install dependensi sistem untuk Chrome | |
| RUN apt-get update && apt-get install -y \ | |
| gpg \ | |
| gnupg \ | |
| wget \ | |
| ca-certificates \ | |
| apt-transport-https \ | |
| --no-install-recommends | |
| # Tambahkan repo Google Chrome dan install | |
| RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | |
| && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ | |
| && apt-get update \ | |
| && apt-get install -y google-chrome-stable --no-install-recommends \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Tentukan direktori kerja | |
| WORKDIR /app | |
| # Copy package.json dan install dependensi | |
| COPY package*.json ./ | |
| RUN npm install | |
| # Copy seluruh kode project | |
| COPY . . | |
| # Berikan hak akses untuk user 'node' (Hugging Face menjalankan container sebagai non-root) | |
| RUN chown -R node:node /app | |
| USER node | |
| # Expose port Fastify | |
| EXPOSE 3000 | |
| # Jalankan server | |
| CMD ["node", "fast.js"] |