forked from flyteorg/flyte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.flyteadmin
53 lines (39 loc) · 1.86 KB
/
Dockerfile.flyteadmin
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
48
49
50
51
52
53
# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES.
# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY:
#
# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst
FROM --platform=${BUILDPLATFORM} golang:1.19-alpine3.16 as builder
ARG TARGETARCH
ENV GOARCH "${TARGETARCH}"
ENV GOOS linux
RUN apk add git openssh-client make curl
# Create the artifacts directory
RUN mkdir /artifacts
# Pull GRPC health probe binary for liveness and readiness checks
RUN GRPC_HEALTH_PROBE_VERSION=v0.4.11 && \
wget -qO/artifacts/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /artifacts/grpc_health_probe && \
echo 'ded15e598d887ccc47bf2321371950bbf930f5e4856b9f75712ce4b2b5120480 /artifacts/grpc_health_probe' > .grpc_checksum && \
sha256sum -c .grpc_checksum
WORKDIR /go/src/github.com/flyteorg/flyteadmin
COPY datacatalog ../datacatalog
COPY flyteadmin .
COPY flytecopilot ../flytecopilot
COPY flyteidl ../flyteidl
COPY flyteplugins ../flyteplugins
COPY flytepropeller ../flytepropeller
COPY flytestdlib ../flytestdlib
# This 'linux_compile' target should compile binaries to the /artifacts directory
# The main entrypoint should be compiled to /artifacts/flyteadmin
RUN make linux_compile
# update the PATH to include the /artifacts directory
ENV PATH="/artifacts:${PATH}"
# This will eventually move to centurylink/ca-certs:latest for minimum possible image size
FROM alpine:3.16
LABEL org.opencontainers.image.source https://github.com/flyteorg/flyteadmin
COPY --from=builder /artifacts /bin
# Ensure the latest CA certs are present to authenticate SSL connections.
RUN apk --update add ca-certificates
RUN addgroup -S flyte && adduser -S flyte -G flyte
USER flyte
CMD ["flyteadmin"]