Skip to content

Commit 9238906

Browse files
krishnaduraik8s-ci-robot
authored andcommitted
Distroless image for TF operator (kubeflow#1124)
* Initial commit for a distroless image TF operator packed in distroless container tf_smoke.py removed * Changing CMD in test infra deployment * Adds / to opt in copy
1 parent a8845a2 commit 9238906

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed
Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
1-
FROM golang:1.10 AS build-image
1+
FROM golang:1.13.5 AS build-image
22

33
ADD . /go/src/github.com/kubeflow/tf-operator
44

55
WORKDIR /go/src/github.com/kubeflow/tf-operator
66

77
RUN go build -o tf-operator.v1 ./cmd/tf-operator.v1
88

9-
FROM registry.access.redhat.com/ubi8/ubi:latest
9+
FROM gcr.io/distroless/base-debian10
1010

11-
# TODO(jlewi): We should probably change the directory to /opt/kubeflow.
12-
RUN mkdir -p /opt/kubeflow/samples
11+
COPY third_party/library/license.txt /opt/license.txt
1312

14-
COPY tf_smoke.py /opt/kubeflow/samples/
15-
RUN chmod a+x /opt/kubeflow/samples/*
13+
COPY vendor /opt/
1614

17-
COPY --from=build-image /go/src/github.com/kubeflow/tf-operator/tf-operator.v1 /opt/kubeflow
15+
COPY --from=build-image /go/src/github.com/kubeflow/tf-operator/tf-operator.v1 /opt/
1816

19-
COPY third_party/library/license.txt /opt/kubeflow/license.txt
20-
21-
RUN mkdir -p /opt/kubeflow/vendor
22-
COPY vendor /opt/kubeflow/vendor/
23-
24-
RUN chmod a+x /opt/kubeflow/tf-operator.v1
25-
26-
ENTRYPOINT ["/opt/kubeflow/tf-operator.v1"]
17+
ENTRYPOINT ["/opt/tf-operator.v1"]

test/test-app/vendor/kubeflow/core@f7a68336ad7a65c2cbba8462e89d24a10626687e/tf-job-operator.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
containers: [
103103
{
104104
command: [
105-
"/opt/kubeflow/tf-operator.v1",
105+
"/opt/tf-operator.v1",
106106
"--alsologtostderr",
107107
"-v=1",
108108
],

0 commit comments

Comments
 (0)