mirror of
https://github.com/dragonheim/gagent.git
synced 2025-01-18 09:36:28 -08:00
James Wells
4717b49701
All checks were successful
G'Agent Scan, Build, and Test / scan (push) Successful in 1m36s
G'Agent Scan, Build, and Test / build_simple (push) Successful in 1m16s
G'Agent Scan, Build, and Test / test_simple (push) Successful in 15s
G'Agent Scan, Build, and Test / build_image (push) Successful in 1m30s
32 lines
830 B
Docker
32 lines
830 B
Docker
FROM dragonheim/golang:1.23 as builder
|
|
ARG SEMVER=${SEMVER:-0.0.11}
|
|
|
|
WORKDIR /gagent
|
|
COPY . .
|
|
|
|
ARG GOOS=${GOOS:-linux}
|
|
# ARG GOARCH=${GOARCH:-amd64}
|
|
ARG CGO_ENABLED=1
|
|
|
|
RUN apk add --no-cache zeromq-dev build-base git
|
|
RUN go build -o /gagent/bin/gagent -ldflags "-X main.Version=${SEMVER}" cmd/gagent/main.go
|
|
RUN strip /gagent/bin/gagent
|
|
|
|
FROM alpine:3.20
|
|
ARG SEMVER
|
|
LABEL Name="G'Agent"
|
|
LABEL Maintainer="jwells@dragonheim.net"
|
|
LABEL License="MIT License"
|
|
LABEL version="${SEMVER}"
|
|
RUN apk add --no-cache zeromq && mkdir -p -m 0700 /etc/gagent
|
|
|
|
COPY --from=builder /gagent/assets/examples/gagent.hcl /etc/gagent/gagent.hcl
|
|
COPY --from=builder /gagent/bin/gagent /usr/bin/
|
|
|
|
# Router Client Worker Prometheus
|
|
EXPOSE 35570/tcp 35572/tcp 35571/tcp 9101/tcp
|
|
VOLUME /etc/gagent
|
|
|
|
CMD ["/usr/bin/gagent"]
|
|
|
|
HEALTHCHECK NONE
|