File size: 587 Bytes
891be39
 
426d92a
 
891be39
426d92a
 
891be39
426d92a
 
891be39
426d92a
 
891be39
426d92a
 
891be39
426d92a
891be39
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.9

# Use a base image with Python installed
FROM python:3.9

# WORKDIR - sets the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow it in the Dockerfile.
WORKDIR /service

# Copy the requirements file to the container
COPY requirements.txt .

#COPY - copies files or directories and adds them to the filesystem of the container.
COPY . ./

# Install the required packages
RUN pip install --no-cache-dir -r requirements.txt

# Set the command to run when the container starts
CMD["uvicorn","app:app","--host","0.0.0.0", "--port", "8000"]