khulnasoft commited on
Commit
6bd9723
·
verified ·
1 Parent(s): 12049b9

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /usr/src/app
6
+
7
+ # Copy the requirements file into the container
8
+ COPY requirements.txt ./
9
+
10
+ # Install the dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Copy the current directory contents into the container at /usr/src/app
14
+ COPY --link . .
15
+
16
+ # Expose port 8080
17
+ EXPOSE 8080
18
+
19
+ # Create a non-root user and switch to it
20
+ RUN useradd -m app_user
21
+ USER app_user
22
+
23
+ # Run the application
24
+ CMD ["python", "gpt_computer_assistant.py"]