-
Notifications
You must be signed in to change notification settings - Fork 443
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
Conversation
Signed-off-by: Ce Gao <gaoce@caicloud.io>
Signed-off-by: Ce Gao <gaoce@caicloud.io>
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 |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
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.
There was a problem hiding this comment.
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>
@gaocegege: The following test failed, say
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. |
/lgtm |
[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 |
fix(cm): cm typo bug
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