-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Conversation
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 |
cc @tophj-ibm |
@dnephin Thanks! I'll try that soon. |
@justincormack I understand the problem, but what is the solution? Is there some way to make a single Dockerfile work for multiple architectures? |
@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. |
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. |
@dnephin Your PR works so far. Still building the three debs for ARM, but making manpages worked fine. |
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 && \ |
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Building from source should work. I'll make that change
@dnephin |
Signed-off-by: Daniel Nephin <[email protected]>
4483187
to
fcde27e
Compare
Ok, glide is now built from source instead of pulled from my bintray |
I'm testing the updated PR on Scaleway |
make deb works fine on ARM with this PR |
LGTM tested this too. |
Fixes #25124
cc @tiborvass