Fix the man/Dockerfile for arm #25192

Merged
merged 1 commit into from Aug 3, 2016

Projects

None yet

10 participants

@dnephin
Member
dnephin commented Jul 28, 2016

Fixes #25124

cc @tiborvass

@dnephin dnephin added this to the 1.12.1 milestone Jul 28, 2016
@justincormack
Member

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
Member
@StefanScherer
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
Member
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
Member

@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
Member
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
Contributor

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

@DieterReuter
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.

@justincormack justincormack and 2 others commented on an outdated diff Jul 28, 2016
man/Dockerfile
-RUN export GLIDE=0.10.2; \
- export SRC=https://github.com/Masterminds/glide/releases/download/; \
- curl -sL ${SRC}/${GLIDE}/glide-${GLIDE}-linux-amd64.tar.gz | \
- tar -xz linux-amd64/glide && \
- mv linux-amd64/glide /usr/bin/glide && \
+RUN mkdir -p /go/src /go/bin /go/pkg
+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 && \
@justincormack
justincormack Jul 28, 2016 Member

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.

@dnephin
dnephin Jul 28, 2016 Member

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.

@justincormack
justincormack Jul 28, 2016 Member

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.

@dnephin
dnephin Jul 28, 2016 Member

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.

@tophj-ibm
tophj-ibm Jul 28, 2016 Contributor

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.

@dnephin
dnephin Aug 2, 2016 Member

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

@jim3ma
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.

@dnephin dnephin Fix the man/Dockerfile for arm
Signed-off-by: Daniel Nephin <dnephin@docker.com>
fcde27e
@dnephin
Member
dnephin commented Aug 2, 2016

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

@StefanScherer
Contributor

I'm testing the updated PR on Scaleway

@StefanScherer
Contributor

make deb works fine on ARM with this PR

@tiborvass
Contributor

LGTM tested this too.

@tiborvass tiborvass merged commit 5e91023 into docker:master Aug 3, 2016

8 checks passed

docker/dco-signed All commits signed
Details
documentation success
Details
experimental Jenkins build Docker-PRs-experimental 21977 has succeeded
Details
gccgo Jenkins build Docker-PRs-gccgo 8589 has succeeded
Details
janky Jenkins build Docker-PRs 30644 has succeeded
Details
userns Jenkins build Docker-PRs-userns 12672 has succeeded
Details
win2lin Jenkins build Docker-PRs-Win2Lin 29238 has succeeded
Details
windowsRS1 Jenkins build Docker-PRs-WoW-RS1 1277 has succeeded
Details
@dnephin dnephin deleted the dnephin:fix-manpages-on-arm branch Aug 3, 2016
@tiborvass tiborvass referenced this pull request Aug 11, 2016
Merged

Cherry picks 1.12.1 #25637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment