-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Distroless image for TF operator (#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
- Loading branch information
1 parent
a8845a2
commit 9238906
Showing
2 changed files
with
7 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,17 @@ | ||
FROM golang:1.10 AS build-image | ||
FROM golang:1.13.5 AS build-image | ||
|
||
ADD . /go/src/github.com/kubeflow/tf-operator | ||
|
||
WORKDIR /go/src/github.com/kubeflow/tf-operator | ||
|
||
RUN go build -o tf-operator.v1 ./cmd/tf-operator.v1 | ||
|
||
FROM registry.access.redhat.com/ubi8/ubi:latest | ||
FROM gcr.io/distroless/base-debian10 | ||
|
||
# TODO(jlewi): We should probably change the directory to /opt/kubeflow. | ||
RUN mkdir -p /opt/kubeflow/samples | ||
COPY third_party/library/license.txt /opt/license.txt | ||
|
||
COPY tf_smoke.py /opt/kubeflow/samples/ | ||
RUN chmod a+x /opt/kubeflow/samples/* | ||
COPY vendor /opt/ | ||
|
||
COPY --from=build-image /go/src/github.com/kubeflow/tf-operator/tf-operator.v1 /opt/kubeflow | ||
COPY --from=build-image /go/src/github.com/kubeflow/tf-operator/tf-operator.v1 /opt/ | ||
|
||
COPY third_party/library/license.txt /opt/kubeflow/license.txt | ||
|
||
RUN mkdir -p /opt/kubeflow/vendor | ||
COPY vendor /opt/kubeflow/vendor/ | ||
|
||
RUN chmod a+x /opt/kubeflow/tf-operator.v1 | ||
|
||
ENTRYPOINT ["/opt/kubeflow/tf-operator.v1"] | ||
ENTRYPOINT ["/opt/tf-operator.v1"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters