ci: add make check, Gitea workflow, numeric runtime user
This commit is contained in:
1 parent
9ebb9cdf0d
commit
539b90cf4e
4 files changed
+70
-2
No files matched your search
@@ -1,3 +1,31 @@
|
||||
# api-go
|
||||
|
||||
Golang API that is the backbone for daily usage, while python works in batches and is heavy in compute while Golang handles concurrent usage cheap
|
||||
Golang API that is the backbone for daily usage, while python works in batches and is heavy in compute while Golang handles concurrent usage cheap
|
||||
|
||||
## Checks
|
||||
|
||||
```sh
|
||||
make check
|
||||
```
|
||||
|
||||
Runs `go vet ./...`, `go test -count=1 ./...`, and `go build ./...`. The same
|
||||
target runs in Gitea Actions on every push and pull request
|
||||
(`.gitea/workflows/ci.yml`).
|
||||
|
||||
## Container
|
||||
|
||||
The image is a multi-stage build. The runtime is
|
||||
`gcr.io/distroless/static-debian12:nonroot` and runs as numeric
|
||||
**UID/GID `65532:65532`** (`USER 65532:65532` in the `Dockerfile`).
|
||||
|
||||
Use the same numbers in Kubernetes:
|
||||
|
||||
```yaml
|
||||
securityContext:
|
||||
runAsUser: 65532
|
||||
runAsGroup: 65532
|
||||
runAsNonRoot: true
|
||||
```
|
||||
|
||||
Do not use named users such as `nonroot` in a `securityContext`: the kubelet
|
||||
cannot verify a non-numeric image user.
|
||||
Reference in new issue
Block a user