combine hub and agent repos

This commit is contained in:
Henry Dollman
2024-07-20 17:10:34 -04:00
parent 0d2765a903
commit 47d1d9a9fa
97 changed files with 695 additions and 3 deletions

20
agent/dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM --platform=$BUILDPLATFORM golang:alpine as builder
WORKDIR /app
# Download Go modules
COPY go.mod go.sum ./
RUN go mod download
COPY *.go ./
# Build
ARG TARGETOS TARGETARCH
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-w -s" -o /agent .
# ? -------------------------
FROM scratch
COPY --from=builder /agent /agent
ENTRYPOINT ["/agent"]