-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (22 loc) · 842 Bytes
/
Dockerfile
File metadata and controls
37 lines (22 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM golang:1.23.0 as builder
WORKDIR /workspace
ARG ORKA_VERSION=3.1.0
# Make it runnable on a distroless image/without libc
ENV CGO_ENABLED=0
COPY go.mod go.sum ./
RUN go mod download
RUN set -eux \
&& curl --location --fail --remote-name \
https://cli-builds-public.s3.eu-west-1.amazonaws.com/official/${ORKA_VERSION}/orka3/linux/amd64/orka3.tar.gz \
&& tar -xzf orka3.tar.gz -C /usr/local/bin
COPY . .
RUN make build
FROM alpine:latest
WORKDIR /
COPY --from=builder /workspace/bin/app /app
COPY --from=builder /usr/local/bin/orka3 /usr/local/bin/orka3
RUN addgroup -S appgroup && adduser -S orka -G appgroup
USER orka
# We need to export this environment variable here to ensure that the runner can be automatically deployed into a Kubernetes cluster.
ENV KUBECONFIG=/home/orka/.kube/config
ENTRYPOINT ["/app"]