From 1191a7a5e69f00222bb4caf93703044e72faa65e Mon Sep 17 00:00:00 2001 From: Hannes Kuchelmeister Date: Tue, 22 Feb 2022 10:33:30 +0100 Subject: [PATCH] move Dockerfile an compose to base folder for later support of different packaging --- .github/workflows/build-push-tagged.yml | 2 +- README.md | 9 ++++++--- Dockerfile => base/Dockerfile | 0 docker-compose.yml => base/docker-compose.yml | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) rename Dockerfile => base/Dockerfile (100%) rename docker-compose.yml => base/docker-compose.yml (82%) diff --git a/.github/workflows/build-push-tagged.yml b/.github/workflows/build-push-tagged.yml index e953447..4f13bcf 100644 --- a/.github/workflows/build-push-tagged.yml +++ b/.github/workflows/build-push-tagged.yml @@ -57,7 +57,7 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: - context: . + context: base push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/README.md b/README.md index 1043b81..34a577b 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,11 @@ This repository contains the build instructions for a rust libadwaita gtk app. A To build the image go to the main repository and run: + +### BaseImage + ``` -docker build gtk4-rs-docker -t gtk4-rs-docker +docker build base -t gtk4-rs-docker ``` ## Compiling the example application @@ -21,10 +24,10 @@ docker-compose up ## Using for your own application To use this image for your own application simply copy the docker-compose file to your application directory and modify the path of the volume mount to your project directory: -You need to modify `./adwaita-demo` to that path in in the compose file): +You need to modify `../adwaita-demo` to that path in in the compose file): ``` volumes: - - ./adwaita-demo:/mnt:z + - ../adwaita-demo:/mnt:z ``` ## Contributing diff --git a/Dockerfile b/base/Dockerfile similarity index 100% rename from Dockerfile rename to base/Dockerfile diff --git a/docker-compose.yml b/base/docker-compose.yml similarity index 82% rename from docker-compose.yml rename to base/docker-compose.yml index 6eefc52..293d29b 100644 --- a/docker-compose.yml +++ b/base/docker-compose.yml @@ -3,6 +3,6 @@ services: rust-gtk: image: ghcr.io/13hannes11/gtk4-rs-docker:latest volumes: - - ./adwaita-demo:/mnt:z + - ../adwaita-demo:/mnt:z command: /bin/bash -c "cargo build --release"