File size: 734 Bytes
fe1089d
de2c597
fe1089d
bf15c20
de2c597
69b34c4
bf15c20
de2c597
fe1089d
8dcb222
de2c597
 
8dcb222
de2c597
fe1089d
8dcb222
de2c597
 
69b34c4
de2c597
fe1089d
bf15c20
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# standard Dockerfile to build a complete, working image of the webapp

# complete build based on clean python (slower)
FROM python:3.11.6

# build based on thesis base with dependencies (quicker) - for dev
#FROM thesis-base:0.2.0

# install dependencies and copy files into image folder
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN pip install fastapi uvicorn
COPY . .

# display files in image folder (for debugging)
RUN ls --recursive .

# setting config and run command
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]

# build and run commands:
## docker build -t thesis:1.3.1 -f Dockerfile .
## docker run -d --name thesis -e HOSTING=local -p 8080:8080 thesis:1.3.1