Spaces:
Runtime error
Runtime error
Download Dockerfile from deepcode-ai/code-translator: direct link, hf CLI and curl.
- Browser
- Download file 598 Bytes
-
https://huggingface.co/spaces/deepcode-ai/code-translator/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/deepcode-ai/code-translator/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/deepcode-ai/code-translator/resolve/main/Dockerfile
598 Bytes
| # Use the official Node.js image as the base image | |
| FROM node:14 | |
| # Set the working directory inside the container | |
| WORKDIR /app | |
| # Copy package.json and package-lock.json to the working directory | |
| COPY package*.json ./ | |
| # Install the dependencies | |
| RUN npm ci | |
| # Copy the rest of the application code to the working directory | |
| COPY . . | |
| # Ensure the application directory and files have the correct permissions | |
| RUN chmod -R 755 /app && chown -R node:node /app | |
| # Switch to the non-root user | |
| USER node | |
| # Expose the port the app will run on | |
| EXPOSE 3001 | |
| # Start the application | |
| CMD ["npm", "run", "dev"] | |