Browse code

Fix the man/Dockerfile for arm

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Daniel Nephin authored on 2016/07/29 03:53:08
Showing 3 changed files
... ...
@@ -135,7 +135,7 @@ validate: build ## validate DCO, Seccomp profile generation, gofmt,\n./pkg/ isol
135 135
 	$(DOCKER_RUN_DOCKER) hack/make.sh validate-dco validate-default-seccomp validate-gofmt validate-pkg validate-lint validate-test validate-toml validate-vet validate-vendor
136 136
 
137 137
 manpages: ## Generate man pages from go source and markdown
138
-	docker build -t docker-manpage-dev -f man/Dockerfile .
138
+	docker build -t docker-manpage-dev -f "man/$(DOCKERFILE)" ./man
139 139
 	docker run \
140 140
 		-v $(PWD):/go/src/github.com/docker/docker/ \
141 141
 		docker-manpage-dev
... ...
@@ -1,16 +1,20 @@
1
-FROM    golang:1.6.3-alpine
1
+FROM    alpine:3.4
2 2
 
3
-RUN     apk add -U git bash curl gcc musl-dev
3
+RUN     apk add -U git go bash curl gcc musl-dev make
4 4
 
5
-RUN     export GLIDE=0.10.2; \
6
-        export SRC=https://github.com/Masterminds/glide/releases/download/; \
7
-        curl -sL ${SRC}/${GLIDE}/glide-${GLIDE}-linux-amd64.tar.gz | \
8
-        tar -xz linux-amd64/glide && \
9
-        mv linux-amd64/glide /usr/bin/glide && \
10
-        chmod +x /usr/bin/glide
5
+RUN     mkdir -p /go/src /go/bin /go/pkg
6
+ENV     GOPATH=/go
7
+RUN     export GLIDE=v0.11.1; \
8
+        export TARGET=/go/src/github.com/Masterminds; \
9
+        mkdir -p ${TARGET} && \
10
+        git clone https://github.com/Masterminds/glide.git ${TARGET}/glide && \
11
+        cd ${TARGET}/glide && \
12
+        make build && \
13
+        cp ./glide /usr/bin/glide && \
14
+        cd / && rm -rf /go/src/* /go/bin/* /go/pkg/*
11 15
 
12
-COPY    man/glide.yaml /manvendor/
13
-COPY    man/glide.lock /manvendor/
16
+COPY    glide.yaml /manvendor/
17
+COPY    glide.lock /manvendor/
14 18
 WORKDIR /manvendor/
15 19
 RUN     glide install && mv vendor src
16 20
 ENV     GOPATH=$GOPATH:/go/src/github.com/docker/docker/vendor:/manvendor
17 21
new file mode 100644
... ...
@@ -0,0 +1,24 @@
0
+FROM    armhf/alpine:3.4
1
+
2
+RUN     apk add -U git go bash curl gcc musl-dev make
3
+
4
+RUN     mkdir -p /go/src /go/bin /go/pkg
5
+ENV     GOPATH=/go
6
+RUN     export GLIDE=v0.11.1; \
7
+        export TARGET=/go/src/github.com/Masterminds; \
8
+        mkdir -p ${TARGET} && \
9
+        git clone https://github.com/Masterminds/glide.git ${TARGET}/glide && \
10
+        cd ${TARGET}/glide && \
11
+        make build && \
12
+        cp ./glide /usr/bin/glide && \
13
+        cd / && rm -rf /go/src/* /go/bin/* /go/pkg/*
14
+
15
+COPY    glide.yaml /manvendor/
16
+COPY    glide.lock /manvendor/
17
+WORKDIR /manvendor/
18
+RUN     glide install && mv vendor src
19
+ENV     GOPATH=$GOPATH:/go/src/github.com/docker/docker/vendor:/manvendor
20
+RUN     go build -o /usr/bin/go-md2man github.com/cpuguy83/go-md2man
21
+
22
+WORKDIR /go/src/github.com/docker/docker/
23
+ENTRYPOINT ["man/generate.sh"]