48 lines
1.3 KiB
Docker
48 lines
1.3 KiB
Docker
# Copyright 2021 The Kubeflow Authors
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
FROM golang:1.23-alpine as builder
|
|
|
|
# Needed musl-dev for github.com/mattn/go-sqlite3
|
|
RUN apk update && apk upgrade && \
|
|
apk add --no-cache bash git openssh gcc musl-dev
|
|
|
|
WORKDIR /go/src/github.com/kubeflow/pipelines
|
|
|
|
COPY ./go.mod ./
|
|
COPY ./go.sum ./
|
|
COPY ./kubernetes_platform/go.mod ./kubernetes_platform/go.mod
|
|
COPY ./api/go.mod ./api/go.mod
|
|
|
|
RUN GO111MODULE=on go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN GO111MODULE=on go build -o /bin/controller backend/src/crd/controller/scheduledworkflow/*.go
|
|
|
|
FROM alpine:3.19
|
|
|
|
RUN apk --no-cache add tzdata
|
|
|
|
RUN adduser -S appuser
|
|
USER appuser
|
|
|
|
WORKDIR /bin
|
|
|
|
COPY --from=builder /bin/controller /bin/controller
|
|
ENV NAMESPACE ""
|
|
ENV LOG_LEVEL info
|
|
|
|
CMD /bin/controller --logtostderr=true --namespace=${NAMESPACE} --logLevel=${LOG_LEVEL}
|