forked from flyteorg/flyte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (34 loc) · 1.21 KB
/
Dockerfile
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
38
39
40
41
42
43
44
45
46
47
ARG FLYTECONSOLE_VERSION=latest
FROM ghcr.io/flyteorg/flyteconsole:${FLYTECONSOLE_VERSION} AS flyteconsole
FROM --platform=${BUILDPLATFORM} golang:1.22-bookworm AS flytebuilder
ARG TARGETARCH
ENV GOARCH="${TARGETARCH}"
ENV GOOS=linux
WORKDIR /flyteorg/build
COPY datacatalog datacatalog
COPY flyteadmin flyteadmin
COPY flytecopilot flytecopilot
COPY flyteidl flyteidl
COPY flyteplugins flyteplugins
COPY flytepropeller flytepropeller
COPY flytestdlib flytestdlib
COPY go.mod go.sum ./
RUN go mod download
COPY cmd cmd
COPY --from=flyteconsole /app/ cmd/single/dist
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/root/go/pkg/mod \
go build -tags console -v -o dist/flyte cmd/main.go
FROM debian:bookworm-slim
ARG FLYTE_VERSION
ENV FLYTE_VERSION="${FLYTE_VERSION}"
ENV DEBCONF_NONINTERACTIVE_SEEN=true
ENV DEBIAN_FRONTEND=noninteractive
# Install core packages
RUN apt-get update && apt-get install --no-install-recommends --yes \
ca-certificates \
tini \
&& rm -rf /var/lib/apt/lists/*
# Copy compiled executable into image
COPY --from=flytebuilder /flyteorg/build/dist/flyte /usr/local/bin/
# Set entrypoint
ENTRYPOINT [ "/usr/bin/tini", "-g", "--", "/usr/local/bin/flyte" ]