Skip to content
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

Dockerfile: Support multiple stage build in manager and cli #25

Merged
merged 3 commits into from
Apr 10, 2018
Merged

Dockerfile: Support multiple stage build in manager and cli #25

merged 3 commits into from
Apr 10, 2018

Conversation

gaocegege
Copy link
Member

Same as #23

I am not sure if we should copy the CLI from the docker container. But I follow the convention to use centos instead of alpine to get the runnable binary from the container.

/assign @YujiOshima

Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
@gaocegege
Copy link
Member Author

PTAL @YujiOshima

ADD api $GOPATH/src/github.com/kubeflow/hp-tuning/api
ADD cli $GOPATH/src/github.com/kubeflow/hp-tuning/cli
WORKDIR $GOPATH/src/github.com/kubeflow/hp-tuning/cli
FROM golang:1.8.2 AS build-env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you use not golang:alpine but golang:1.8.2 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because you can not build the binary in alpine and use it in ubuntu or centos.

https://stackoverflow.com/questions/36279253/go-compiled-binary-wont-run-in-an-alpine-docker-container-on-ubuntu-host?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

I tried to copy the binary build in alpine and call it in ubuntu it returns:

$ ls -l ./bin
-rwxr-xr-x 1 ist ist 12733320 4月  10 10:51 katib-cli
$ ./bin/katib-cli
zsh: no such file or directory: ./bin/katib-cli

Thus we have to build it in a normal go image. And I think we could avoid it by installing the binary from another way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, OK. I understood. And I agree we should look for another way.
Anyway, LGTM for this PR.

Signed-off-by: Ce Gao <gaoce@caicloud.io>
@k8s-ci-robot
Copy link

@gaocegege: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
kubeflow-hp-tuning-presubmit 4b60de3 link /test kubeflow-hp-tuning-presubmit

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@YujiOshima
Copy link
Contributor

/lgtm

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: YujiOshima

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gaocegege gaocegege merged commit ea48c08 into kubeflow:master Apr 10, 2018
@gaocegege gaocegege deleted the dockerfile-all branch April 10, 2018 03:04
kuikuikuizzZ added a commit to kuikuikuizzZ/katib that referenced this pull request Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants