This repository has been archived by the owner on Feb 28, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
images/docker-arm/docker-1.9 | ||
images/docker-arm/backup/ | ||
images/swarm-arm-builder/binary/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM armhf/ubuntu | ||
RUN apt-get update && apt-get -qy install git nano curl wget build-essential | ||
|
||
RUN wget \ | ||
https://github.com/hypriot/golang-armbuilds/releases/download/v1.5.2/go1.5.2.linux-armv7.tar.gz | ||
RUN tar -xf go*.tar.gz -C /usr/local/ | ||
|
||
ENV PATH \ | ||
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin | ||
RUN mkdir /go | ||
ENV GOPATH /go | ||
ENV AUTO_GOPATH 1 | ||
RUN go version | ||
RUN AUTO_GOPATH=1 go get github.com/tools/godep | ||
|
||
CMD ["go version"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
go 1.5 for ARM, built out with the binary from @hypriot | ||
|
||
This image can be used to build docker swarm, godep etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
docker build -t alexellis2/go-arm:1.5 . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM alexellis2/go-arm:1.5 | ||
|
||
WORKDIR $GOPATH/src/github.com/docker/ | ||
RUN git clone https://github.com/docker/swarm | ||
WORKDIR $GOPATH/src/github.com/docker/swarm | ||
RUN mkdir -p /usr/lib/go/pkg/linux_arm_netgo/ | ||
ENV CGO_ENABLED 0 | ||
ENV PATH \ | ||
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/go/bin | ||
|
||
RUN godep go install -v -a -tags netgo -installsuffix netgo -ldflags '-extldflags "-static" -s' . | ||
WORKDIR /root/ | ||
ADD ./export_binary.sh ./ | ||
|
||
CMD ["/go/bin/swarm", "--help"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Builds an ARM compatible docker swarm binary through Docker | ||
============================================================ | ||
|
||
### Depends on alexellis2/arm-go:1.5 | ||
|
||
For the article, this is prebuilt and available in the swarm-arm folder. | ||
|
||
If you wish to rebuild its binary from source run build.sh and then copy ./binary/swarm to ../swarm-arm/ and | ||
rebuild the container. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
docker build -t alexellis2/swarm-arm-builder . | ||
mkdir -p binary | ||
docker run -v `pwd`/binary:/tmp/binary alexellis2/swarm-arm-builder /root/export_binary.sh | ||
|
||
echo "An ARM compatible swarm binary will now be found in the /binary folder" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
cp /go/bin/swarm /tmp/binary/ | ||
|