diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a14e123..85eb1f5 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -11,16 +11,15 @@ on: jobs: build-and-push-kiwix-tools: name: Deploy kiwix-tools Docker Image - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3.4.0 - name: build and publish kiwix-tools - uses: openzim/docker-publish-action@v9 + uses: openzim/docker-publish-action@v10 with: image-name: kiwix/kiwix-tools + registries: ghcr.io credentials: | - DOCKERIO_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} - DOCKERIO_TOKEN=${{ secrets.DOCKERHUB_PASSWORD }} GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} context: docker @@ -38,17 +37,16 @@ jobs: build-and-push-kiwix-serve: name: Deploy kiwix-serve Docker Image - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: build-and-push-kiwix-tools steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3.4.0 - name: build and publish kiwix-serve - uses: openzim/docker-publish-action@v9 + uses: openzim/docker-publish-action@v10 with: image-name: kiwix/kiwix-serve + registries: ghcr.io credentials: | - DOCKERIO_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} - DOCKERIO_TOKEN=${{ secrets.DOCKERHUB_PASSWORD }} GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} context: docker/server diff --git a/README.md b/README.md index 9da2d5e..6179696 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ command line tools: [![latest release](https://img.shields.io/github/v/tag/kiwix/kiwix-tools?label=latest%20release&sort=semver)](https://download.kiwix.org/release/kiwix-tools/) [![Repositories](https://img.shields.io/repology/repositories/kiwix-tools?label=repositories)](https://github.com/kiwix/kiwix-tools/wiki/Repology) -[![Docker](https://img.shields.io/docker/v/kiwix/kiwix-tools?arch=amd64&label=Docker&sort=date)](https://hub.docker.com/r/kiwix/kiwix-tools) -[![Docker (kiwix-serve)](https://img.shields.io/docker/v/kiwix/kiwix-serve?arch=amd64&label=Docker%20(kiwix-serve)&sort=date)](https://hub.docker.com/r/kiwix/kiwix-serve) +[![Docker](https://ghcr-badge.deta.dev/kiwix/kiwix-tools/latest_tag?label=docker)](https://ghcr.io/kiwix/kiwix-tools) +[![Docker](https://ghcr-badge.deta.dev/kiwix/kiwix-tools/latest_tag?label=docker%20(kiwix-serve))](https://ghcr.io/kiwix/kiwix-tools) [![Sandstorm](https://img.shields.io/badge/Sandstorm-kiwix-blue)](https://apps.sandstorm.io/app/5uh349d0kky2zp5whrh2znahn27gwha876xze3864n0fu9e5220h) [![Build Status](https://github.com/kiwix/kiwix-tools/workflows/CI/badge.svg?query=branch%3Amain)](https://github.com/kiwix/kiwix-tools/actions?query=branch%3Amain) [![Doc](https://readthedocs.org/projects/kiwix-tools/badge/?style=flat)](https://kiwix-tools.readthedocs.org/en/latest/?badge=latest) @@ -113,10 +113,10 @@ Like for the installation, you might need to run the command as `root` Docker ------ -An official Docker image of the Kiwix tools can be found in the -[Docker Hub](https://hub.docker.com/r/kiwix/kiwix-tools). A +An official Docker image of the Kiwix tools can be found on +[GHCR](https://ghcr.io/kiwix/kiwix-tools). A `kiwix-serve` dedicated Docker image [exists -too](https://hub.docker.com/r/kiwix/kiwix-serve). +too](https://ghcr.io/kiwix/kiwix-serve). Troubleshooting --------------- diff --git a/docker/README.md b/docker/README.md index 92add62..7d45858 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,14 +1,14 @@ Kiwix-tools Docker image === -- Available on [docker.io](https://hub.docker.com/r/kiwix/kiwix-tools) and [ghcr.io](https://ghcr.io/kiwix/kiwix-tools). +- Available on [ghcr.io](https://ghcr.io/kiwix/kiwix-tools). - multi-arch (`linux/amd64`, `linux/arm64`, `linux/arm/v7`) - based on official `kiwix-tools` binaries. ## Usage ``` sh -$ docker run -it kiwix/kiwix-tools:3.1.2 +$ docker run -it ghcr.io/kiwix/kiwix-tools:3.1.2 Welcome to kiwix-tools! The following binaries are available: kiwix-manage kiwix-search kiwix-serve @@ -17,7 +17,7 @@ kiwix-manage kiwix-search kiwix-serve `kiwix-tools` operates on zim files. You shall mount a volume to access the files. ```sh -docker run -v $(pwd):/data -it kiwix/kiwix-tools kiwix-search /data/wikipedia_fr_test.zim "Mali" +docker run -v $(pwd):/data -it ghcr.io/kiwix/kiwix-tools kiwix-search /data/wikipedia_fr_test.zim "Mali" ``` ## Building and reusing diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile index d1a8d7c..0d4b19e 100644 --- a/docker/server/Dockerfile +++ b/docker/server/Dockerfile @@ -1,7 +1,7 @@ ARG VERSION=latest # kiwix-tools is multi-arch -FROM kiwix/kiwix-tools:$VERSION +FROM ghcr.io/kiwix/kiwix-tools:$VERSION LABEL org.opencontainers.image.source https://github.com/openzim/kiwix-tools # expose kiwix-serve default port and workdir diff --git a/docker/server/README.md b/docker/server/README.md index 4904e40..1def593 100644 --- a/docker/server/README.md +++ b/docker/server/README.md @@ -9,14 +9,14 @@ With local ZIM file(s) * Given `wikipedia.zim` and `wiktionary.zim` reside in `/tmp/zim/`, execute the following: ```bash -docker run -v /tmp/zim:/data -p 8080:8080 kiwix/kiwix-serve wikipedia.zim wiktionary.zim +docker run -v /tmp/zim:/data -p 8080:8080 ghcr.io/kiwix/kiwix-serve wikipedia.zim wiktionary.zim ``` With remote ZIM file -------------------- ```bash -docker run -e "DOWNLOAD=https://download.kiwix.org/zim/wikipedia_bm_all.zim" -p 8080:8080 kiwix/kiwix-serve +docker run -e "DOWNLOAD=https://download.kiwix.org/zim/wikipedia_bm_all.zim" -p 8080:8080 ghcr.io/kiwix/kiwix-serve ``` Change default port @@ -25,7 +25,7 @@ Change default port You can change port to expose with environment variable PORT, useful if running on Podman, K8s or OpenShift ```bash -podman run -e "DOWNLOAD=https://download.kiwix.org/zim/wikipedia_bm_all.zim" -e PORT=8888 -p 8080:8888 kiwix/kiwix-serve +podman run -e "DOWNLOAD=https://download.kiwix.org/zim/wikipedia_bm_all.zim" -e PORT=8888 -p 8080:8888 ghcr.io/kiwix/kiwix-serve ``` ARM @@ -33,7 +33,7 @@ ARM Build an image for an ARM based GNU/Linux: ```bash -docker build . -t kiwix/kiwix-serve:latest --build-arg ARCH="arm32v7/" +docker build . -t ghcr.io/kiwix/kiwix-serve:latest --build-arg ARCH="arm32v7/" ``` You can also deploy kiwix with [`docker-compose`](https://docs.docker.com/compose/). Check out a sample at [docker-compose.yml.example](docker-compose.yml.example)