forked from flyteorg/flyte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.flytepropeller
43 lines (31 loc) · 1.3 KB
/
Dockerfile.flytepropeller
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
# 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.21-alpine3.18 as builder
ARG TARGETARCH
ENV GOARCH "${TARGETARCH}"
ENV GOOS linux
RUN apk add git openssh-client make curl
WORKDIR /go/src/github.com/flyteorg/flytepropeller
COPY boilerplate ../boilerplate
COPY datacatalog ../datacatalog
COPY flyteadmin ../flyteadmin
COPY flytecopilot ../flytecopilot
COPY flyteidl ../flyteidl
COPY flyteplugins ../flyteplugins
COPY flytepropeller .
COPY flytestdlib ../flytestdlib
# This 'linux_compile' target should compile binaries to the /artifacts directory
# The main entrypoint should be compiled to /artifacts/flytepropeller
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.18
LABEL org.opencontainers.image.source https://github.com/flyteorg/flytepropeller
COPY --from=builder /artifacts /bin
RUN apk --update add ca-certificates
RUN addgroup -S flyte && adduser -S flyte -G flyte
USER flyte
CMD ["flytepropeller"]