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

Fix the man/Dockerfile for arm #25192

Merged
merged 1 commit into from
Aug 3, 2016
Merged

Conversation

dnephin
Copy link
Member

@dnephin dnephin commented Jul 28, 2016

Fixes #25124

cc @tiborvass

@justincormack
Copy link
Contributor

The problem here is that each architecture needs a new Dockerfile to build the man pages.

We have an open PR for Power debs for example #23438 and this will now need to add a man page builder, and there is not yet a ppc64le/alpine, so it will have to be custom.

@justincormack
Copy link
Contributor

cc @tophj-ibm

@StefanScherer
Copy link
Contributor

@dnephin Thanks! I'll try that soon.
@justincormack That's right, but the previous build with make manpages did only work for amd64.

@dnephin
Copy link
Member Author

dnephin commented Jul 28, 2016

@justincormack I understand the problem, but what is the solution? Is there some way to make a single Dockerfile work for multiple architectures?

@justincormack
Copy link
Contributor

@dnephin can we add the prerequisites to build the man pages to the main Dockerfile? We already have one for each architecture there, and they have Go.

Otherwise I think vendoring is the best solution.

@dnephin
Copy link
Member Author

dnephin commented Jul 28, 2016

I'm not really a fan of either of those options.

The current Dockerfile is already way too big. Putting every project task into a single image makes build tasks slow, and is hard to maintain. You can't really track which dependencies are used for which tasks. I really think we should be splitting the main Dockerfile into different ones for: build, linting, cross-build, docs (already done), and man pages.

I really dislike checking in generated code into the repo.

@StefanScherer
Copy link
Contributor

@dnephin Your PR works so far. Still building the three debs for ARM, but making manpages worked fine.

@DieterReuter
Copy link
Contributor

Probable in the future we could connect to a multi-arch Docker Swarm as build environment, so we could build the man pages in an amd64 container and the binaries natively on amd64/arm/ppc64le, and so on.

ENV GOPATH=/go
RUN export GLIDE=v0.11.1; \
export SRC=https://dl.bintray.com/dnephin/glide/; \
curl -sL -o /usr/bin/glide ${SRC}/glide-${GLIDE}-linux-amd64 && \
Copy link
Contributor

Choose a reason for hiding this comment

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

I really don't like downloading binaries like this. There should be autobuild or official containers with the prerequisites, with a clear way for people to build them for different architectures from source if we are going to have per architecture Dockerfiles.

Copy link
Member Author

Choose a reason for hiding this comment

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

There is no official build for arm yet (it's being worked on Masterminds/glide#528).

I can setup circle CI to build binaries from a fork I guess, but I wanted to get this fixed asap to unblock building the arm debs. I'll look at getting that setup next week.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, but we are talking about getting an upstream project to generate builds for eventually ppc64le, s390x, arm64, arm, and more... in order to build absolutely identical man pages. It really makes vendoring seem like a better option.

Copy link
Member Author

Choose a reason for hiding this comment

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

Only having to build the man pages on a single platform would be great. I believe we could do that with a jenkins pipeline and build artifacts.

Copy link
Contributor

Choose a reason for hiding this comment

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

What about cloning and building from source like we do in the main Dockerfiles? I just tested on power and was able to make a glide binary and make the man pages from there.

Copy link
Member Author

Choose a reason for hiding this comment

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

Building from source should work. I'll make that change

@jim3ma
Copy link

jim3ma commented Jul 29, 2016

@dnephin
"I really think we should be splitting the main Dockerfile into different ones for: build, linting, cross-build, docs (already done), and man pages."
+1
Sometimes we need checkout source code and build binary, the building base image is like golang:1.6-alpine, but, the output binary just depends on alpine:xxx.

Signed-off-by: Daniel Nephin <[email protected]>
@dnephin dnephin force-pushed the fix-manpages-on-arm branch from 4483187 to fcde27e Compare August 2, 2016 16:56
@dnephin
Copy link
Member Author

dnephin commented Aug 2, 2016

Ok, glide is now built from source instead of pulled from my bintray

@icecrime icecrime added status/2-code-review priority/P1 Important: P1 issues are a top priority and a must-have for the next release. and removed status/1-design-review priority/P1 Important: P1 issues are a top priority and a must-have for the next release. labels Aug 2, 2016
@StefanScherer
Copy link
Contributor

I'm testing the updated PR on Scaleway

@StefanScherer
Copy link
Contributor

make deb works fine on ARM with this PR

@tiborvass
Copy link
Contributor

LGTM tested this too.

@tiborvass tiborvass merged commit 5e91023 into moby:master Aug 3, 2016
@dnephin dnephin deleted the fix-manpages-on-arm branch August 3, 2016 18:11
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.

10 participants