From 3d347053a7c231caebb70c4daa0597784fd51d2c Mon Sep 17 00:00:00 2001 From: Joeri Voet <2750496+jwavoet@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:01:43 +0100 Subject: [PATCH 1/2] Upgrade to Alpine 3.20 (Python 3.12) --- Dockerfile | 4 ++-- README.md | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index cec8c27..ef8993c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.19 +FROM alpine:3.20 # This hack is widely applied to avoid python printing issues in docker containers. # See: https://github.com/Docker-Hub-frolvlad/docker-alpine-python3/pull/13 @@ -9,7 +9,7 @@ RUN echo "**** install Python ****" && \ if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \ \ echo "**** install pip ****" && \ - rm /usr/lib/python3.11/EXTERNALLY-MANAGED && \ + rm /usr/lib/python3.12/EXTERNALLY-MANAGED && \ python -m ensurepip && \ rm -r /usr/lib/python*/ensurepip && \ if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \ diff --git a/README.md b/README.md index 9ab4600..cf49366 100644 --- a/README.md +++ b/README.md @@ -2,27 +2,26 @@ [![Docker Pulls](https://img.shields.io/docker/pulls/frolvlad/alpine-python3.svg?style=flat-square)](https://hub.docker.com/r/frolvlad/alpine-python3/) -Python 3.11 Docker image +Python 3.12 Docker image ======================== This image is based on Alpine Linux image, which is only a 5MB image, and contains [Python 3.x](https://www.python.org/). -This image is only 71MB on disk. +This image is only 67MB on disk. Usage Example ------------- ```bash -$ docker run --rm frolvlad/alpine-python3 python3 -c 'print("Hello World")' +$ docker run --rm dovetailworld/alpine-python3 python3 -c 'print("Hello World")' ``` Once you have run this command you will get printed 'Hello World' from Python! Or use it interactivelly: ```bash -$ docker run -it --rm frolvlad/alpine-python3 python3 +$ docker run -it --rm dovetailworld/alpine-python3 python3 ``` - NOTE: `pip`/`pip3` is also available in this image. From 6a7b3b1eb2d7ffcbb83811b293ebb39332ca00db Mon Sep 17 00:00:00 2001 From: Joeri Voet <2750496+jwavoet@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:04:08 +0100 Subject: [PATCH 2/2] Remove workflow Not needed for our usecase --- .github/workflows/build-and-push.yaml | 36 --------------------------- 1 file changed, 36 deletions(-) delete mode 100644 .github/workflows/build-and-push.yaml diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml deleted file mode 100644 index c5176b1..0000000 --- a/.github/workflows/build-and-push.yaml +++ /dev/null @@ -1,36 +0,0 @@ -name: ci - -on: - workflow_dispatch: - push: - branches: - - 'master' - schedule: - # Daily - - cron: '0 0 * * *' - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v3 - with: - pull: true - push: true - tags: frolvlad/alpine-python3:latest - cache-from: type=registry,ref=frolvlad/alpine-python3:latest - cache-to: type=inline