From f82ca074b88e42fda04a8c2ea95755b454bff7a6 Mon Sep 17 00:00:00 2001 From: shreddedbacon Date: Thu, 17 Apr 2025 11:37:10 +1000 Subject: [PATCH 1/2] chore: support mtk repository override --- .github/workflows/docker-image.yaml | 1 - Dockerfile | 11 ++++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 963297e..118789b 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -82,7 +82,6 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | - MTK_VERSION=$mtk_version "VERSION=${{ env.VERSION }}" "BUILD=${{ env.BUILD }}" "GO_VER=${{ matrix.goversion }}" diff --git a/Dockerfile b/Dockerfile index af968d4..4af4566 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,15 +6,16 @@ ARG IMAGE_REPO FROM golang:${GO_VER:-1.23}-alpine3.20 AS golang # build MTK +ARG MTK_REPOSITORY ARG MTK_VERSION -ENV MTK_VERSION=v2.1.1 +ENV MTK_VERSION=${MTK_VERSION:-v2.1.1} +ENV MTK_REPOSITORY=${MTK_REPOSITORY:-https://github.com/skpr/mtk.git} -WORKDIR /go/src/github.com/skpr RUN apk add --virtual --update-cache git && \ rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/* -ADD https://github.com/skpr/mtk.git#$MTK_VERSION ./mtk +ADD $MTK_REPOSITORY#$MTK_VERSION /go/src/mtk -WORKDIR /go/src/github.com/skpr/mtk +WORKDIR /go/src/mtk # compile RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -a -o bin/mtk-dump github.com/skpr/mtk/cmd/mtk @@ -55,7 +56,7 @@ FROM ${IMAGE_REPO:-uselagoon}/commons AS commons # Put in some labels so people know what this image is for LABEL org.opencontainers.image.authors="The Lagoon Authors" maintainer="The Lagoon Authors" -COPY --from=golang /go/src/github.com/skpr/mtk/bin/mtk-dump /usr/local/bin/mtk-dump +COPY --from=golang /go/src/mtk/bin/mtk-dump /usr/local/bin/mtk-dump COPY --from=golang /app/database-image-task /usr/local/bin/database-image-task # Install necessary packages From 7410897f24db33836c0b1024e9cd6850f07d4071 Mon Sep 17 00:00:00 2001 From: shreddedbacon Date: Thu, 17 Apr 2025 13:11:05 +1000 Subject: [PATCH 2/2] chore: add temporary doghouse override --- .github/workflows/docker-image.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 118789b..2956418 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -82,6 +82,8 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | + MTK_VERSION=fix-string-types + MTK_REPOSITORY=https://github.com/tnelson-doghouse/mtk.git "VERSION=${{ env.VERSION }}" "BUILD=${{ env.BUILD }}" "GO_VER=${{ matrix.goversion }}"