-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Dockerfile #5926
base: master
Are you sure you want to change the base?
Update Dockerfile #5926
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# syntax=docker/dockerfile:1.4-labs | ||
|
||
FROM --platform=${BUILDPLATFORM} mgoltzsche/podman:minimal AS builder | ||
|
||
ARG TARGETARCH | ||
# Set architecture with a default fallback | ||
ARG TARGETARCH=amd64 | ||
ENV TARGETARCH "${TARGETARCH}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should not change, right? |
||
|
||
WORKDIR /build | ||
|
@@ -18,6 +20,8 @@ ENV GOARCH "${TARGETARCH}" | |
ENV GOOS linux | ||
|
||
WORKDIR /flyteorg/build | ||
|
||
# Separate dependency caching step for go modules | ||
COPY bootstrap/go.mod bootstrap/go.sum ./ | ||
RUN go mod download | ||
COPY bootstrap/ ./ | ||
|
@@ -37,12 +41,10 @@ COPY images/tar/${TARGETARCH}/ /var/lib/rancher/k3s/agent/images/ | |
COPY manifests/ /var/lib/rancher/k3s/server/manifests-staging/ | ||
COPY bin/ /bin/ | ||
|
||
# Install bootstrap | ||
COPY --from=bootstrap /flyteorg/build/dist/flyte-sandbox-bootstrap /bin/ | ||
|
||
VOLUME /var/lib/flyte/storage | ||
|
||
# Set environment variable for picking up additional CA certificates | ||
ENV SSL_CERT_DIR /var/lib/flyte/config/ca-certificates | ||
|
||
ENTRYPOINT [ "/bin/k3d-entrypoint.sh" ] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM alpine:3.13.5 AS base | ||
FROM alpine:latest AS base | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's use an explicit version, e.g. 3.20.3. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I agree with @eapolinario |
||
|
||
# Install dependencies | ||
RUN apk add --no-cache openssl | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs mention that
TARGETARCH
is one of the pre-defined arguments in buildkit contexts, so no need to define this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check it now