diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..ca43e62 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,10 @@ +stages: + - test + - build + - scan + - push + - sign + +include: + - project: caas/cicd_templates + file: ci_general.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7e7f832 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM cgr.dev/chainguard/go:latest as gobuild +WORKDIR /app +ADD . . +RUN go mod download +RUN CGO_ENABLED=0 go build -ldflags "-s -w" -o canary . + +FROM scratch +COPY --from=gobuild /app/canary /canary +COPY --from=gobuild /etc/passwd /etc/passwd +USER 65532 +ENTRYPOINT ["/canary"] \ No newline at end of file