Skip to content

Commit

Permalink
fix: update python and dockerfile (#9)
Browse files Browse the repository at this point in the history
* fix: update python and dockerfile

Signed-off-by: Martin Buchleitner <[email protected]>

* lower score

Signed-off-by: Martin Buchleitner <[email protected]>

---------

Signed-off-by: Martin Buchleitner <[email protected]>
  • Loading branch information
mabunixda authored Nov 5, 2024
1 parent fa24b87 commit 018bb1a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
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
```

0 comments on commit 018bb1a

Please sign in to comment.