feat(oci): Build using pure Buildah

I prefer control everything to build images
This commit is contained in:
2025-08-13 09:47:59 +02:00
parent b13e922966
commit 37c7998412
2 changed files with 35 additions and 27 deletions

View File

@@ -1,15 +1,17 @@
ARG GOVERSION=1.24
FROM docker.io/golang:${GOVERSION} AS builder
WORKDIR /go/src/github.com/katenary/katenary
COPY . .
ARG VERSION=master
RUN set -xe; \
CGO_ENABLED=0 go install -v github.com/katenary/katenary/cmd/katenary@$VERSION;
CGO_ENABLED=0 go build -ldflags="-X 'github.com/katenary/katenary/internal/generator.Version=$VERSION'" -trimpath -o katenary ./cmd/katenary
FROM scratch
LABEL org.opencontainers.image.source=https://github.com/katenary/katenary
LABEL org.opencontainers.image.description="Katenary converts compose files to Helm Chart"
LABEL org.opencontainers.image.licenses=MIT
COPY --from=builder /go/bin/katenary /usr/local/bin/katenary
COPY --from=builder /go/src/github.com/katenary/katenary/katenary /katenary
VOLUME /project
WORKDIR /project
ENTRYPOINT ["/usr/local/bin/katenary"]
ENTRYPOINT ["/katenary"]