Skip to content

Commit 42065d4

Browse files
committed
Bump dependencies and move to 3.13
Signed-off-by: Kristian Berg <kristian.berg@tietoevry.com>
1 parent f31b1cf commit 42065d4

5 files changed

Lines changed: 44 additions & 51 deletions

File tree

.github/workflows/dockerimage.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
name: Docker Image CI
2-
on:
2+
on:
33
workflow_dispatch:
44
push:
5-
branches: master
5+
branches: [master]
66
jobs:
77
build:
88
runs-on: ubuntu-latest
9-
if:
109
steps:
11-
- uses: actions/checkout@v4
12-
- name: Install git
13-
run: sudo apt-get install git
14-
- name: Quay login
15-
uses: docker/login-action@v3.0.0
16-
with:
17-
registry: quay.io
18-
username: ${{ secrets.QUAY_USER }}
19-
password: ${{ secrets.QUAY_TOKEN }}
20-
- name: Build images
21-
run: make all
22-
10+
- uses: actions/checkout@v3
11+
- name: Install git
12+
run: sudo apt-get install git
13+
- name: Quay login
14+
uses: docker/login-action@v3.1.0
15+
with:
16+
registry: quay.io
17+
username: ${{ secrets.QUAY_USER }}
18+
password: ${{ secrets.QUAY_TOKEN }}
19+
- name: Build images
20+
run: make all

Dockerfile

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/evryfs/base-python:3.12.0
1+
FROM quay.io/evryfs/base-python:3.13.3
22
ARG BUILD_DATE
33
ARG BUILD_URL
44
ARG GIT_URL
@@ -8,34 +8,32 @@ ARG UVICORN_VERSION
88
ARG GUNICORN_VERSION
99
ARG VERSION
1010
LABEL maintainer="Kristian Berg <kristian.berg@evry.com>" \
11-
org.opencontainers.image.title="base-python-asgi" \
12-
org.opencontainers.image.created=$BUILD_DATE \
13-
org.opencontainers.image.authors="Kristian Berg <kristian.berg@evry.com>" \
14-
org.opencontainers.image.url=$BUILD_URL \
15-
org.opencontainers.image.documentation="https://github.com/evryfs/base-python-asgi/" \
16-
org.opencontainers.image.source=$GIT_URL \
17-
org.opencontainers.image.version=$VERSION \
18-
org.opencontainers.image.revision=$GIT_COMMIT \
19-
org.opencontainers.image.vendor="TietoEvry Financial Services" \
20-
org.opencontainers.image.licenses="proprietary-license" \
21-
org.opencontainers.image.description="Base image for ASGI apps using python $PY_VER with uvicorn $UVICORN_VERSION and gunicorn $GUNICORN_VERSION"
11+
org.opencontainers.image.title="base-python-asgi" \
12+
org.opencontainers.image.created=$BUILD_DATE \
13+
org.opencontainers.image.authors="Kristian Berg <kristian.berg@tietoevry.com>" \
14+
org.opencontainers.image.url=$BUILD_URL \
15+
org.opencontainers.image.documentation="https://github.com/evryfs/base-python-asgi/" \
16+
org.opencontainers.image.source=$GIT_URL \
17+
org.opencontainers.image.version=$VERSION \
18+
org.opencontainers.image.revision=$GIT_COMMIT \
19+
org.opencontainers.image.vendor="Tietoevry Banking" \
20+
org.opencontainers.image.licenses="proprietary-license" \
21+
org.opencontainers.image.description="Base image for ASGI apps using python $PY_VER with uvicorn $UVICORN_VERSION and gunicorn $GUNICORN_VERSION"
2222

2323
ENV UVICORN_PORT 8000
2424
ENV UVICORN_HOST 0.0.0.0
2525
ENV CONTEXT_ROOT ""
2626
USER root
2727
RUN apt-get update && \
28-
apt-get install -y gcc && \
29-
apt-get -y clean && \
30-
rm -rf /var/cache/apt /var/lib/apt/lists/* /tmp/* /var/tmp/*
28+
apt-get install -y gcc && \
29+
apt-get -y clean && \
30+
rm -rf /var/cache/apt /var/lib/apt/lists/* /tmp/* /var/tmp/*
3131
COPY requirements.txt /tmp/requirements.txt
32-
RUN pip install -r /tmp/requirements.txt
32+
RUN pip install --no-cache-dir -r /tmp/requirements.txt
3333
RUN apt-get purge -y gcc && rm -rf /var/lib/apt/lists/*
3434
COPY start_uvicorn /bin/
3535
RUN chmod 755 /bin/start_uvicorn
3636
USER 1001:100
3737
WORKDIR /app
3838
EXPOSE $UVICORN_PORT
39-
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
40-
CMD curl -I --silent --fail "http://localhost:$UVICORN_PORT/$CONTEXT_ROOT" || exit 1
4139
ENTRYPOINT ["/bin/start_uvicorn"]

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ GIT_COMMIT := $(shell git rev-parse HEAD)
77
PY_VER := $(shell head -n1 Dockerfile|cut -d":" -f2|cut -d"-" -f1)
88
PY_MINOR_VER := $(shell head -n1 Dockerfile|cut -d":" -f2|cut -d"-" -f1|cut -d"." -f1,2)
99
UVICORN_VERSION ?= $(shell grep uvicorn requirements.txt|cut -d"=" -f3)
10-
GUNICORN_VERSION ?= $(shell grep gunicorn requirements.txt|cut -d"=" -f3)
11-
VERSION = "$(PY_VER)-$(UVICORN_VERSION)-$(GUNICORN_VERSION)"
10+
VERSION = "$(PY_VER)-$(UVICORN_VERSION)"
1211

1312
all: latest push
1413

@@ -23,7 +22,6 @@ latest:
2322
-t quay.io/evryfs/base-python-asgi:"$(PY_MINOR_VER)"-stable \
2423
-t quay.io/evryfs/base-python-asgi:stable \
2524
--build-arg UVICORN_VERSION="$(UVICORN_VERSION)" \
26-
--build-arg GUNICORN_VERSION="$(GUNICORN_VERSION)" \
2725
--build-arg VERSION="$(VERSION)" \
2826
--build-arg BUILD_DATE="$(BUILD_DATE)" \
2927
--build-arg BUILD_URL="$(BUILD_URL)" \

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# EVRY FS python ASGI base image
1+
# Python ASGI base image
22

33
[![Docker Repository on Quay](https://quay.io/repository/evryfs/base-python-asgi/status "Docker Repository on Quay")](https://quay.io/repository/evryfs/base-python-asgi)
44

55
This image forms the basis for running python ASGI applications. It is based on
6-
the EVRY python base image and uses uvicorn.
6+
the Tietoevry python base image and uses uvicorn.
77

88
## Usage
99

@@ -12,12 +12,12 @@ environment flags to control how the ASGI application is started.
1212

1313
### Available flags
1414

15-
Flag | Default | Comment
16-
----------------- | ----------------- | ---------------------------------------------------
17-
UVICORN_PORT | 8000 | Application port.
18-
UVICORN_HOST | 0.0.0.0 | Application bind address.
19-
UVICORN_LOG_LEVEL | info | Set uvicorn log level.
20-
CONTEXT_ROOT | None | Context root where application is served.
15+
| Flag | Default | Comment |
16+
| ----------------- | ------- | ----------------------------------------- |
17+
| UVICORN_PORT | 8000 | Application port. |
18+
| UVICORN_HOST | 0.0.0.0 | Application bind address. |
19+
| UVICORN_LOG_LEVEL | info | Set uvicorn log level. |
20+
| CONTEXT_ROOT | None | Context root where application is served. |
2121

2222
### Creating a Dockerfile
2323

@@ -26,7 +26,7 @@ Dockerfile based on this. Then add your python sauce to the container and set
2626
the name of the ASGI module with `CMD ["module:callable"]`.
2727

2828
```dockerfile
29-
FROM quay.io/evryfs/base-python-asgi:3.9-stable
29+
FROM quay.io/evryfs/base-python-asgi:3.13-stable
3030
ARG BUILD_DATE
3131
ARG BUILD_URL
3232
ARG GIT_URL
@@ -42,7 +42,7 @@ LABEL maintainer="Your Name <your.email.here@evry.com>"
4242
org.opencontainers.image.source=$GIT_URL
4343
org.opencontainers.image.version="<version number>"
4444
org.opencontainers.image.revision=$GIT_COMMIT
45-
org.opencontainers.image.vendor="EVRY Financial Services"
45+
org.opencontainers.image.vendor="Tietoevry Banking"
4646
org.opencontainers.image.licenses="proprietary-license"
4747
org.opencontainers.image.description="<system description>"
4848

@@ -51,6 +51,6 @@ CMD ["asgi_module:app"]
5151
```
5252

5353
The default workdir for this image is /app, so any sauce will be copied there.
54-
Remember to reset WORKDIR to /app, if you do additional steps in your
55-
derivative image. The wrapper scripts depends on the module being either in
56-
python's site-packages or present in the current directory.
54+
Remember to reset WORKDIR to /app, if you do additional steps in your derivative
55+
image. The wrapper scripts depends on the module being either in python's
56+
site-packages or present in the current directory.

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
uvicorn==0.24.0.post1
2-
gunicorn==20.1.0
1+
uvicorn==0.34.2

0 commit comments

Comments
 (0)