File tree Expand file tree Collapse file tree 3 files changed +43
-12
lines changed
Expand file tree Collapse file tree 3 files changed +43
-12
lines changed Original file line number Diff line number Diff line change 1- # More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
2- # Ignore build and test binaries.
1+ # Version control
2+ .git
3+ .gitignore
4+
5+ # Documentation
6+ * .md
7+ docs /
8+
9+ # Tests
10+ * _test.go
11+ internal /testhelpers
12+ internal /tests
13+
14+ # Development
15+ .env
16+ .env. *
17+ * .log
18+ skaffold.yaml
19+ skaffold.example.env
20+
21+ # Build artifacts
322bin /
423helm /
524internal /demo
25+
26+ # IDE
27+ .vscode
28+ .idea
29+ * .swp
30+
31+ # CI/CD
32+ .github
33+ .goreleaser.yml
34+ .goreleaser.main.yml
35+
36+ # Go
37+ go.work
38+ go.work.sum
Original file line number Diff line number Diff line change 1- # Build the manager binary
21FROM golang:1.25 AS builder
32ARG TARGETOS
43ARG TARGETARCH
54
65WORKDIR /workspace
7- # Copy the Go Modules manifests
8- COPY go.mod go.mod
9- COPY go.sum go.sum
10- # cache deps before building and copying source so that we don't need to re-download as much
11- # and so that source changes don't invalidate our downloaded layer
12- RUN go mod download
136
14- # Copy the go source
7+ COPY go.mod go.sum ./
8+ RUN --mount=type=cache,target=/go/pkg/mod go mod download
9+
1510COPY cmd/main.go cmd/main.go
1611COPY api/ api/
1712COPY internal/k8s internal/k8s
@@ -20,7 +15,6 @@ COPY internal/controller internal/controller
2015COPY internal/planner internal/planner
2116COPY internal/defaults internal/defaults
2217
23- # Build
2418# the GOARCH has not a default value to allow the binary be built according to the host where the command
2519# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
2620# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
Original file line number Diff line number Diff line change 11FROM gcr.io/distroless/static-debian12:nonroot
22
3- COPY temporal-worker-controller /usr/local/bin/temporal-worker-controller
3+ WORKDIR /app
4+
5+ COPY --chown=nonroot:nonroot temporal-worker-controller /usr/local/bin/temporal-worker-controller
6+
7+ USER nonroot
48
59ENTRYPOINT ["temporal-worker-controller"]
You can’t perform that action at this time.
0 commit comments