generated from openziti/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5350b3a
commit 75d98ff
Showing
13 changed files
with
297 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,32 @@ | ||
|
||
# build executable | ||
FROM golang:1.22 AS build-stage | ||
WORKDIR /app | ||
COPY . . | ||
RUN go build -o build/ ./... | ||
RUN --mount=type=cache,target=/go/pkg/mod \ | ||
--mount=type=cache,target=/root/.cache/go-build \ | ||
go build -o build/ ./... | ||
|
||
# | ||
## | ||
# | ||
|
||
# auto-updated by Dependabot | ||
FROM docker.io/openziti/ziti-cli:1.1.16 | ||
|
||
FROM cgr.dev/chainguard/wolfi-base:latest AS build-release-stage | ||
### Required OpenShift Labels | ||
LABEL name="openziti/ziti-k8s-agent" \ | ||
maintainer="[email protected]" \ | ||
vendor="NetFoundry" \ | ||
summary="Run the OpenZiti k8s Agent" \ | ||
description="Run the OpenZiti k8s Agent" | ||
|
||
# set up image as root | ||
USER root | ||
COPY --from=build-stage /app/build/ziti-agent /usr/local/bin/ | ||
RUN chmod 0755 /usr/local/bin/ziti-agent | ||
USER nobody | ||
ENTRYPOINT ["ziti-agent"] | ||
|
||
# install artifacts as root | ||
COPY --from=build-stage --chmod=0755 /app/build/ziti-agent /usr/local/bin/ | ||
|
||
# drop privs | ||
USER ziggy | ||
ENTRYPOINT [ "ziti-agent" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.