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

make Dockerfile & Makefile cross platform #670

Merged
merged 2 commits into from Apr 18, 2018

Conversation

kunmingg
Copy link
Contributor

@kunmingg kunmingg commented Apr 16, 2018

by building bootstrap package within docker.


This change is Reviewable

@kunmingg
Copy link
Contributor Author

@jlewi
make build will not work till #654 (contains missing vendor dependencies) merged.
You can test it by make build REPO=https://github.com/kunmingg/kubeflow.git

@@ -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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, updated

@jlewi
Copy link
Contributor

jlewi commented Apr 18, 2018

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit ffc8919 into kubeflow:master Apr 18, 2018
saffaalvi pushed a commit to StatCan/kubeflow that referenced this pull request Feb 11, 2021
* make Dockerfile & Makefile cross platform by building bootstrap package within docker

* build bootstrap from local branch within docker build
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.

None yet

3 participants