From b9b3db9499bfd74b97577d3d702feda7f7f937ce Mon Sep 17 00:00:00 2001 From: Usman Rashid Date: Thu, 24 Jul 2025 12:25:19 +1200 Subject: [PATCH 1/2] Added Dockerfile and container workflow --- .github/workflows/release.yml | 50 +++++++++++++++++++++++++++++++++++ Dockerfile | 23 ++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..25bfe68 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +# +name: Create and publish a Docker image + +on: + release: + types: [published, prereleased] + push: + branches: + - main + - master + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + + - name: Log in to the Container registry + uses: docker/login-action@v3.4.0 + 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.7.0 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=tag + type=sha + + - name: Build and push Docker image + uses: docker/build-push-action@v6.18.0 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c40512e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM debian:stable AS builder + +RUN apt-get update && apt-get install -y \ + git \ + build-essential \ + zlib1g-dev \ + libbz2-dev \ + liblzma-dev \ + libcurl4-openssl-dev \ + ca-certificates \ + libomp-dev + +COPY . /usr/src +WORKDIR /usr/src +RUN make -j8 + +FROM debian:stable-slim + +RUN apt-get update && apt-get install -y \ + procps \ + libgomp1 + +COPY --from=builder /usr/src/bin/* /usr/local/bin/ From bb3c814e2b0f4694cf5e335447a0feb5a7a394d7 Mon Sep 17 00:00:00 2001 From: Usman Rashid Date: Fri, 25 Jul 2025 14:24:40 +1200 Subject: [PATCH 2/2] Added samtools to the final container --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c40512e..04fd209 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ FROM debian:stable-slim RUN apt-get update && apt-get install -y \ procps \ - libgomp1 + libgomp1 \ + samtools COPY --from=builder /usr/src/bin/* /usr/local/bin/