Skip to content

Commit

Permalink
Build flytescheduler image
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Apolinario <[email protected]>
  • Loading branch information
eapolinario committed Sep 13, 2023
1 parent 9553c6a commit 3e4101d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 14 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ jobs:
- flyteadmin
- flytecopilot
- flytepropeller
- flytescheduler
uses: ./.github/workflows/publish.yml
with:
version: "test-version-monorepo"
Expand All @@ -161,17 +162,3 @@ jobs:
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}
FLYTE_BOT_USERNAME: ${{ secrets.FLYTE_BOT_USERNAME }}

# TODO(monorepo): push flytescheduler image
# push-docker-image-flytescheduler:
# name: Build & Push Flytescheduler Image
# needs: [ bump_version ]
# uses: flyteorg/flytetools/.github/workflows/publish.yml@master
# with:
# version: ${{ needs.bump_version.outputs.version }}
# push: true
# repository: flyteorg/flytescheduler
# dockerfile: scheduler.Dockerfile
# secrets:
# FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}
# FLYTE_BOT_USERNAME: ${{ secrets.FLYTE_BOT_USERNAME }}
47 changes: 47 additions & 0 deletions Dockerfile.flytescheduler
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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

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_scheduler' target should compile binaries to the /artifacts directory
# The main entrypoint should be compiled to /artifacts/flytescheduler
RUN make linux_compile_scheduler

# 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.15
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 ["flytescheduler"]

0 comments on commit 3e4101d

Please sign in to comment.