From 423fe260a11ded9d85289c60d47f1c80f02adaf6 Mon Sep 17 00:00:00 2001 From: Brunno Vanelli Date: Fri, 20 Mar 2026 22:38:52 -0300 Subject: [PATCH 1/2] ci: Add dockerize workflow. --- .github/workflows/dockerize.yaml | 24 ++++++++++++++++++++++++ Dockerfile | 10 ++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/dockerize.yaml diff --git a/.github/workflows/dockerize.yaml b/.github/workflows/dockerize.yaml new file mode 100644 index 0000000..f6665f7 --- /dev/null +++ b/.github/workflows/dockerize.yaml @@ -0,0 +1,24 @@ +name: Build and push Docker image +on: + release: + types: [published] + workflow_dispatch: +jobs: + dockerize: + name: Build and push to GHCR + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v6 + - name: Build image + run: | + buildah build \ + -t ghcr.io/${{ github.repository }}:$GITHUB_REF_NAME \ + -t ghcr.io/${{ github.repository }}:latest . + - name: Push image + run: | + buildah login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io + buildah push ghcr.io/${{ github.repository }}:$GITHUB_REF_NAME + buildah push ghcr.io/${{ github.repository }}:latest diff --git a/Dockerfile b/Dockerfile index 7e8619e..0742c75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,13 @@ -FROM python:3.13-slim-bookworm +FROM ghcr.io/astral-sh/uv:python3.14-trixie-slim AS builder WORKDIR /app COPY . . -RUN pip install . && pip cache purge && rm -rf /app/* +RUN uv build + +FROM python:3.14-slim-trixie + +COPY --from=builder /app/dist/*.whl /tmp/ +RUN pip install --no-cache-dir /tmp/*.whl && rm /tmp/*.whl ENTRYPOINT ["crpy"] +CMD ["--help"] From b05122560159a8e3ea977d5a15ea5348456270b6 Mon Sep 17 00:00:00 2001 From: Brunno Vanelli Date: Fri, 20 Mar 2026 23:04:48 -0300 Subject: [PATCH 2/2] docs: Add docker mention to readme. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 9943db1..04e6bb8 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,12 @@ If you want to live on the edge and have the latest development features, instal pip install git+https://github.com/bvanelli/crpy.git ``` +Alternatively, you can run it directly with Docker: + +```bash +docker run --rm ghcr.io/bvanelli/crpy:latest pull alpine:latest +``` + # Basic CLI usage For a preview of the options, here is the help command: