Update Dockerfile
Browse files- Dockerfile +24 -6
Dockerfile
CHANGED
|
@@ -1,10 +1,28 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
|
|
|
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the image from GitHub Container Registry
|
| 2 |
+
FROM ghcr.io/gngpp/ninja:latest
|
| 3 |
|
| 4 |
+
# User Setup (if needed)
|
| 5 |
+
RUN useradd -m -u 1001 user
|
| 6 |
|
| 7 |
+
# Set environment variables
|
| 8 |
+
ENV HOME=/home/user \
|
| 9 |
+
PATH=/home/user/.local/bin:$PATH \
|
| 10 |
+
PYTHONUNBUFFERED=1
|
| 11 |
|
| 12 |
+
# Set the working directory in the container to the application directory
|
| 13 |
+
WORKDIR /code
|
| 14 |
|
| 15 |
+
# Copy Python requirements file
|
| 16 |
+
COPY requirements.txt .
|
| 17 |
+
|
| 18 |
+
# Install Python dependencies
|
| 19 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
+
|
| 21 |
+
# Copy your application files into the container
|
| 22 |
+
COPY . /code
|
| 23 |
+
|
| 24 |
+
# Expose any ports your application might use (if applicable)
|
| 25 |
+
EXPOSE 7860
|
| 26 |
+
|
| 27 |
+
# Specify the command to run your Node.js application
|
| 28 |
+
CMD ["node", "server.js"]
|