Store agent ID in config file (#1888)

This commit is contained in:
Timo Tomasini
2023-07-02 17:22:05 +02:00
committed by GitHub
parent 0e25d6d35a
commit eb5c48a85f
8 changed files with 145 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ ENV GODEBUG=netdns=go
EXPOSE 3000
COPY --from=build /src/dist/woodpecker-agent /bin/
RUN mkdir -p /etc/woodpecker
HEALTHCHECK CMD ["/bin/woodpecker-agent", "ping"]
ENTRYPOINT ["/bin/woodpecker-agent"]

View File

@@ -6,6 +6,7 @@ ARG TARGETOS TARGETARCH
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \
make build-agent
RUN mkdir -p /etc/woodpecker
FROM scratch
ENV GODEBUG=netdns=go
@@ -15,6 +16,7 @@ EXPOSE 3000
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
# copy agent binary
COPY --from=build /src/dist/woodpecker-agent /bin/
COPY --from=build /etc/woodpecker /etc
HEALTHCHECK CMD ["/bin/woodpecker-agent", "ping"]
ENTRYPOINT ["/bin/woodpecker-agent"]