-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (20 loc) · 722 Bytes
/
Dockerfile
File metadata and controls
29 lines (20 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Use an official Python runtime as a parent image
FROM python:3.9-slim-buster
# Set the working directory in the container
WORKDIR /app
# Create a non-root user
RUN useradd -m appuser
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Change ownership of the app directory to the non-root user
RUN chown -R appuser:appuser /app
# Switch to the non-root user
USER appuser
# Make port 80 available to the world outside this container
EXPOSE 80
# Define environment variable
ENV NAME PRIscope
# Run priscope.py when the container launches
ENTRYPOINT ["python", "priscope.py"]