-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (23 loc) · 821 Bytes
/
Dockerfile
File metadata and controls
28 lines (23 loc) · 821 Bytes
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
FROM golang:1.22 AS build
# Set mpi-operator version
# Defaults to v2
ARG VERSION=v2
ARG RELEASE_VERSION
ADD . /go/src/github.com/kubeflow/mpi-operator
WORKDIR /go/src/github.com/kubeflow/mpi-operator
RUN apt update
RUN apt install -y build-essential cmake zlib1g-dev
RUN apt update \
&& apt install -y --no-install-recommends \
g++ \
gfortran \
libopenmpi-dev \
&& rm -rf /var/lib/apt/lists/*
RUN make RELEASE_VERSION=${RELEASE_VERSION} mpi-operator.$VERSION
RUN ln -s mpi-operator.${VERSION} _output/cmd/bin/mpi-operator
FROM gcr.io/distroless/base-debian12:latest
ENV CONTROLLER_VERSION=$VERSION
COPY --from=build /go/src/github.com/kubeflow/mpi-operator/_output/cmd/bin/* /opt/
COPY third_party/library/license.txt /opt/license.txt
ENTRYPOINT ["/opt/mpi-operator"]
CMD ["--help"]