|
|
@ -14,7 +14,7 @@ In a hurry and already know this stuff? Jump to the [`Dockerfile` below 👇](#b |
|
|
<summary>Dockerfile Preview 👀</summary> |
|
|
<summary>Dockerfile Preview 👀</summary> |
|
|
|
|
|
|
|
|
```Dockerfile |
|
|
```Dockerfile |
|
|
FROM python:3.9 |
|
|
FROM python:3.14 |
|
|
|
|
|
|
|
|
WORKDIR /code |
|
|
WORKDIR /code |
|
|
|
|
|
|
|
|
@ -166,7 +166,7 @@ Now in the same project directory create a file `Dockerfile` with: |
|
|
|
|
|
|
|
|
```{ .dockerfile .annotate } |
|
|
```{ .dockerfile .annotate } |
|
|
# (1)! |
|
|
# (1)! |
|
|
FROM python:3.9 |
|
|
FROM python:3.14 |
|
|
|
|
|
|
|
|
# (2)! |
|
|
# (2)! |
|
|
WORKDIR /code |
|
|
WORKDIR /code |
|
|
@ -390,7 +390,7 @@ If your FastAPI is a single file, for example, `main.py` without an `./app` dire |
|
|
Then you would just have to change the corresponding paths to copy the file inside the `Dockerfile`: |
|
|
Then you would just have to change the corresponding paths to copy the file inside the `Dockerfile`: |
|
|
|
|
|
|
|
|
```{ .dockerfile .annotate hl_lines="10 13" } |
|
|
```{ .dockerfile .annotate hl_lines="10 13" } |
|
|
FROM python:3.9 |
|
|
FROM python:3.14 |
|
|
|
|
|
|
|
|
WORKDIR /code |
|
|
WORKDIR /code |
|
|
|
|
|
|
|
|
@ -499,7 +499,7 @@ Of course, there are **special cases** where you could want to have **a containe |
|
|
In those cases, you can use the `--workers` command line option to set the number of workers that you want to run: |
|
|
In those cases, you can use the `--workers` command line option to set the number of workers that you want to run: |
|
|
|
|
|
|
|
|
```{ .dockerfile .annotate } |
|
|
```{ .dockerfile .annotate } |
|
|
FROM python:3.9 |
|
|
FROM python:3.14 |
|
|
|
|
|
|
|
|
WORKDIR /code |
|
|
WORKDIR /code |
|
|
|
|
|
|
|
|
|