Skip to content

Commit 57d3641

Browse files
authored
Upgrade to Ubuntu 24.04 with python 3.12 (#189)
* Upgrade to Ubuntu 22.04 with python 3.12 * Fix warning on dockerfile * Simply tox file
1 parent 104bce5 commit 57d3641

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

.github/workflows/tox.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ on:
1111
jobs:
1212
build:
1313
name: Tox unit tests and linting
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1515
strategy:
1616
matrix:
17-
python-version: ['3.10']
17+
python-version: ['3.12','3.13']
1818

1919
steps:
2020
- name: Check out the repository

Dockerfile

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
FROM ubuntu:jammy AS python-builder
1+
FROM ubuntu:24.04 AS python-builder
22

33
RUN apt-get update && \
4-
apt-get install -y python3 python3-venv && \
5-
rm -rf /var/lib/apt/lists/*
4+
apt-get install -y python3 python3-venv
65

76
RUN python3 -m venv /venv && \
87
/venv/bin/pip install -U pip setuptools
@@ -14,16 +13,16 @@ COPY . /app
1413
RUN /venv/bin/pip install /app
1514

1615

17-
FROM ubuntu:jammy
16+
FROM ubuntu:24.04
1817

1918
# Don't buffer stdout and stderr as it breaks realtime logging
20-
ENV PYTHONUNBUFFERED 1
19+
ENV PYTHONUNBUFFERED=1
2120

2221
# Create the user that will be used to run the app
23-
ENV APP_UID 1001
24-
ENV APP_GID 1001
25-
ENV APP_USER app
26-
ENV APP_GROUP app
22+
ENV APP_UID=1001
23+
ENV APP_GID=1001
24+
ENV APP_USER=app
25+
ENV APP_GROUP=app
2726
RUN groupadd --gid $APP_GID $APP_GROUP && \
2827
useradd \
2928
--no-create-home \
@@ -40,5 +39,4 @@ RUN apt-get update && \
4039
COPY --from=python-builder /venv /venv
4140

4241
USER $APP_UID
43-
ENTRYPOINT ["tini", "-g", "--"]
44-
CMD ["/venv/bin/kopf", "run", "--module", "capi_janitor.openstack.operator", "--all-namespaces"]
42+
CMD ["/venv/bin/kopf", "run", "--module", "capi_janitor.openstack.operator", "--all-namespaces", "--verbose"]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.ruff]
22
# Match Black's style
33
line-length = 88
4-
target-version = "py310" # adjust to your minimum supported Python version
4+
target-version = "py312" # adjust to your minimum supported Python version
55

66
# Match Flake8/hacking exclude patterns
77
exclude = [

0 commit comments

Comments
 (0)