23 lines
608 B
Markdown
23 lines
608 B
Markdown
# Image-Python-3-8-fastapi
|
|
|
|
## Create Base Image
|
|
```bash
|
|
docker pull python:3.8-slim
|
|
docker tag python:3.8-slim docker.sciocatti.com/python:3.8-slim
|
|
docker push docker.sciocatti.com/python:3.8-slim
|
|
```
|
|
|
|
## Build Fastapi Image
|
|
```bash
|
|
docker build -f Dockerfile.python-3-8-fastapi -t docker.sciocatti.com/python-3.8-fastapi:0.0.1 .
|
|
```
|
|
|
|
## Run Locally
|
|
```bash
|
|
docker run --name=bb_fastapi -d --restart=always -p 64000:15234 -v {some project}:/project docker.sciocatti.com/python-3.8-fastapi:0.0.1 /project/start.sh
|
|
```
|
|
|
|
## Push to Registry
|
|
```bash
|
|
docker push docker.sciocatti.com/python-3.8-fastapi:0.0.1
|
|
``` |