From 72428be59b9a9fd068daf2ceab1f0e975e6fe93e Mon Sep 17 00:00:00 2001 From: Sebastian Schildt Date: Tue, 11 Jun 2024 23:54:20 +0900 Subject: [PATCH] Feature/push to quay.io (#30) * Also push to quay.io --------- Signed-off-by: Sebastian Schildt --- .github/workflows/kuksa-client.yml | 13 +++++++++++-- README.md | 5 ++--- docs/docker.md | 8 +++++++- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/kuksa-client.yml b/.github/workflows/kuksa-client.yml index 13c3fa5..d23f53f 100644 --- a/.github/workflows/kuksa-client.yml +++ b/.github/workflows/kuksa-client.yml @@ -51,6 +51,7 @@ jobs: # list of Docker images to use as base name for tags images: | ghcr.io/eclipse-kuksa/kuksa-python-sdk/kuksa-client + quay.io/eclipse-kuksa/kuksa-client # generate Docker tags based on the following events/attributes tags: | type=ref,event=branch @@ -67,7 +68,7 @@ jobs: id: buildx uses: docker/setup-buildx-action@v3 - - name: Log in to the Container registry + - name: Log in to ghcr.io container registry if: needs.check_ghcr_push.outputs.push == 'true' uses: docker/login-action@v3 with: @@ -77,7 +78,15 @@ jobs: #username: kuksa-bot #keep it for now, maybe the standard token can not push to same package #password: ${{ secrets.PUSH_CONTAINER_TOKEN }} - - name: Build kuksa command line client docker and push to ghcr.io + - name: Log in to quay.io container registry + if: needs.check_ghcr_push.outputs.push == 'true' + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.QUAY_IO_USERNAME }} + password: ${{ secrets.QUAY_IO_TOKEN }} + + - name: Build kuksa command line client docker and push to ghcr.io, quay.io and ttl.sh if: needs.check_ghcr_push.outputs.push == 'true' uses: docker/build-push-action@v5 with: diff --git a/README.md b/README.md index ef4669c..963218b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # KUKSA Python SDK + ![kuksa.val Logo](https://raw.githubusercontent.com/eclipse-kuksa/kuksa-python-sdk/main/docs/pictures/logo.png) KUKSA Python Client and SDK is a part of the open source project [Eclipse KUKSA](https://www.eclipse.org/kuksa/). @@ -10,7 +11,6 @@ KUKSA Python SDK provides both a command-line interface (CLI) and a standalone l [KUKSA Server](https://github.com/eclipse/kuksa.val/tree/master/kuksa-val-server) or [KUKSA Databroker](https://github.com/eclipse/kuksa.val/tree/master/kuksa_databroker). - ## Building and Installing the KUKSA Python SDK The fastest way to start using KUKSA Python SDK is to install a pre-built version from pypi.org: @@ -39,8 +39,7 @@ More details on how to use the CLI is available in the KUKSA Python SDK [CLI doc ## Using Docker for the CLI -The KUKSA Python SDK CLI is available as a [prebuilt docker container](https://github.com/eclipse-kuksa/kuksa-python-sdk/pkgs/container/kuksa-python-sdk%2Fkuksa-client). -For more details see the KUKSA Python SDK [Docker documentation](https://github.com/eclipse-kuksa/kuksa-python-sdk/blob/main/docs/docker.md). +The KUKSA Python SDK CLI is available as a [prebuilt docker container](https://github.com/eclipse-kuksa/kuksa-python-sdk/blob/main/docs/docker.md). ## Using KUKSA Python SDK as library diff --git a/docs/docker.md b/docs/docker.md index f88ef8e..042b1c9 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -10,10 +10,15 @@ The latest released docker version container can be run like this, arguments can docker run --rm -it --net=host ghcr.io/eclipse-kuksa/kuksa-python-sdk/kuksa-client:latest ``` +If the ghcr registry is not easily accessible to you, e.g. if you are a China mainland user, we also made the container images available at quay.io: + +```console +docker run --rm -it --net=host quay.io/eclipse-kuksa/kuksa-client:latest +``` + You can build a local docker image of the testclient using the [`Dockerfile`](../kuksa-client/Dockerfile). The Dockerfile needs to be built from the repo root directory. - ```console cd /some/dir/kuksa-python-sdk/ docker build -f kuksa-client/Dockerfile -t kuksa-client:latest . @@ -26,5 +31,6 @@ docker run --rm -it --net=host kuksa-client:latest --help ``` Notes: + - `--rm` ensures we do not keep the docker container lying around after closing kuksa-client and `--net=host` makes sure you can reach locally running kuksa.val-server or kuksa-val docker with port forwarding on the host using the default `127.0.0.1` address. - CLI arguments that follow image name (e.g. `kuksa-client:latest`) will be passed through to kuksa-client entry point (e.g. `--help`).