Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update python and dockerfile #9

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
MONDOO_SERVICE_ACCOUNT: "${{ fromJson(secrets.VAULT_KV_1D187965_OP_MONDOO_PACKER_AGENT).password }}"
with:
dockerfile: Dockerfile
score: 20
score: 0
platforms: "linux/amd64, linux/arm64"
release: true

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
```