Skip to content

Commit

Permalink
fix: update python and dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Buchleitner <[email protected]>
  • Loading branch information
mabunixda committed Nov 5, 2024
1 parent fa24b87 commit e971526
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use an official Python runtime as a parent image
FROM python:3.7-slim
FROM python:3.12-slim

# Set the working directory to /app
WORKDIR /app
Expand All @@ -14,7 +14,7 @@ RUN pip install --trusted-host pypi.python.org -r /app/requirements.txt
EXPOSE 80

# Define environment variable
ENV NAME World
ENV NAME=World

# Run app.py when the container launches
CMD ["python", "app.py"]
2 changes: 1 addition & 1 deletion src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Flask
Flask>=3
11 changes: 4 additions & 7 deletions training-prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@ Have the images in a registry available for attendees

$ git clone https://github.com/infralovers/training-flask-app
$ cd training-flask-app/
$ $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
$ echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin

$ docker build -t friendlyhello .
$ docker tag friendlyhello ghcr.io/infralovers/training-flask-app:v1
$ docker build -t ghcr.io/infralovers/training-flask-app:v1 .
$ docker push ghcr.io/infralovers/training-flask-app:v1

$ git switch v2
$ docker build -t training-flask-app:v2 .
$ docker tag training-flask-app:v2 ghcr.io/infralovers/training-flask-app:v2
$ docker build -t ghcr.io/infralovers/training-flask-app:v2 .
$ docker push ghcr.io/infralovers/training-flask-app:v2

$ git switch v3
$ docker build -t training-flask-app:v3 .
$ docker tag training-flask-app:v3 ghcr.io/infralovers/training-flask-app:v3
$ docker build -t ghcr.io/infralovers/training-flask-app:v3 .
$ docker push ghcr.io/infralovers/training-flask-app:v3
```

0 comments on commit e971526

Please sign in to comment.