-
Notifications
You must be signed in to change notification settings - Fork 21
/
Dockerfile.dev
37 lines (30 loc) · 1.14 KB
/
Dockerfile.dev
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.18 AS build
WORKDIR /go/src/github.com/furiko-io/furiko
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build \
-a -v \
-o build/execution-controller \
/go/src/github.com/furiko-io/furiko/cmd/execution-controller && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build \
-a -v \
-o build/execution-webhook \
/go/src/github.com/furiko-io/furiko/cmd/execution-webhook
FROM alpine:3.15.0 AS furiko-base
RUN addgroup -S furiko-io && adduser -S furiko -G furiko-io
WORKDIR /home/furiko
# Install various tools in the base image.
# NOTE(irvinlim): This installs the latest tz database at time of build.
RUN apk add --update --no-cache ca-certificates tzdata && \
rm -rf /var/cache/apk/*
FROM furiko-base AS execution-controller
COPY --from=build /go/src/github.com/furiko-io/furiko/build/execution-controller /
USER 100:101
ENTRYPOINT [ "/execution-controller" ]
FROM furiko-base AS execution-webhook
COPY --from=build /go/src/github.com/furiko-io/furiko/build/execution-webhook /
USER 100:101
ENTRYPOINT [ "/execution-webhook" ]