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
make Dockerfile & Makefile cross platform #670
Conversation
bootstrap/Dockerfile
Outdated
@@ -1,6 +1,8 @@ | |||
# TODO(jlewi): How can we make it work with golang:1.8.2-alpine | |||
FROM golang:1.8.2 | |||
|
|||
ARG KUBEFLOW_REPO=https://github.com/kubeflow/kubeflow.git |
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.
For local builds can we access the files from a volume mount so that we don't have to clone the repo?
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.
Now copy code from local repo during stage 1.
bootstrap/Dockerfile
Outdated
cd $GOPATH/src/github.com/kubeflow && \ | ||
git clone $KUBEFLOW_REPO | ||
|
||
RUN go build -i -o /opt/kubeflow/bootstraper ${GOPATH}/src/github.com/kubeflow/kubeflow/bootstrap/cmd/bootstrap/main.go |
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.
How about using multi-stage builds so the final image doesn't include the source tree?
https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
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.
Good point, updated
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jlewi 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 |
* make Dockerfile & Makefile cross platform by building bootstrap package within docker * build bootstrap from local branch within docker build
by building bootstrap package within docker.
This change is