From 14e02a178d1536d80d52fb8c949e13f1eb957772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elo=C3=AFse=20Brocas?= Date: Fri, 5 Dec 2025 17:03:37 +0100 Subject: [PATCH 1/4] CI: add workflow --- .github/workflows/docker.yml | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 000000000..e843f916a --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,43 @@ +name: Build and Push Docker image +on: + push: + branches: + - main + tags: + - v* + pull_request: +env: + REGISTRY: ghcr.io + IMAGE_NAME: quarkslab/numbatui +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + permissions: + packages: write + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From c0bfec5ddea0c0c97af8f8ded40e2e57fb29a751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elo=C3=AFse=20Brocas?= Date: Fri, 5 Dec 2025 17:11:26 +0100 Subject: [PATCH 2/4] ci: fix dockerfile path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eloïse Brocas --- .github/workflows/docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e843f916a..1c1d57c10 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -39,5 +39,6 @@ jobs: with: context: . push: true + file: docker/Dockerfile tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From 892a7bb4c424c07ef1451e14a6f2697716b2aa3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elo=C3=AFse=20Brocas?= Date: Fri, 5 Dec 2025 17:23:09 +0100 Subject: [PATCH 3/4] update readme with docker download link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eloïse Brocas --- README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a62c64d97..a974c4e43 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,16 @@ Features added are: ## Usage We strongly recommend using the provided Docker image to run NumbatUI, as -it contains all the required dependencies. To build the docker image: - -```bash -cd docker -docker build -t numbatui . -``` +it contains all the required dependencies. You can either: +- Build locally the docker image: + ```bash + cd docker + docker build -t numbatui . + ``` +- Download it from github: + ```bash + docker pull ghcr.io/quarkslab/numbatui + ``` Then to open the */path/to/my_database.srctrlprj* database with NumbatUI, run: From c9c171add17bb24cfd4346834309fb5cdaaa3bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elo=C3=AFse=20Brocas?= Date: Fri, 5 Dec 2025 16:51:22 +0100 Subject: [PATCH 4/4] update readme with launching commands for docker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eloïse Brocas --- README.md | 46 +++++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a974c4e43..b845f422d 100644 --- a/README.md +++ b/README.md @@ -32,19 +32,39 @@ it contains all the required dependencies. You can either: docker pull ghcr.io/quarkslab/numbatui ``` -Then to open the */path/to/my_database.srctrlprj* database with NumbatUI, run: - -```bash -docker run -it --env DISPLAY=$DISPLAY \ - --env QT_X11_NO_MITSHM=1 \ - --volume /tmp/.X11-unix:/tmp/.X11-unix \ - --volume /path/to/:/data/ \ - numbatui:latest /data/my_database.srctrlprj -``` - -It will open NumbatUI with the database. Note: as the application is a GUI Qt application -one needs to forward the X11 display to the container. - +Then open the */path/to/my_database.srctrlprj* database with NumbatUI. The command will depend of your windowing system, as the application is a GUI Qt application +one needs to forward the X11/Wayland display to the container. + + +- For **X11** users, run the following command. You may need to add allow `docker` to use your Xserver. +> [!NOTE] +> You may need to add allow `docker` to use your Xserver. +> ```bash +> xhost +local:docker +> ``` +> After usage, you can remove this authorization with: +> ```bash +> xhost -local:docker +> ``` + ```bash + docker run -it --rm \ + --env DISPLAY=$DISPLAY \ + --env QT_X11_NO_MITSHM=1 \ + --volume /tmp/.X11-unix:/tmp/.X11-unix \ + --volume /path/to/:/data/ \ + numbatui:latest /data/my_database.srctrlprj + ``` +- For **Wayland** users, run the following command: + ```bash + docker run -it --rm \ + --env QT_QPA_PLATFORM=wayland \ + --env XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \ + --env WAYLAND_DISPLAY=$WAYLAND_DISPLAY \ + --volume /run/user/1000/$WAYLAND_DISPLAY:/run/user/1000/$WAYLAND_DISPLAY \ + --volume /usr/share/wayland-sessions:/usr/share/wayland-sessions \ + --volume /path/to/:/data/ \ + numbatui:latest /data/my_database.srctrlprj + ``` ## Manual Installation