-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Move Dockerfile build to Go 1.4.1 - Rename bash scripts to have .sh ext - build-docker.sh build the actual binary as well now
- Loading branch information
Eugene Yakubovich
committed
Feb 12, 2015
1 parent
8fe5bfa
commit 80d96d7
Showing
3 changed files
with
10 additions
and
2 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 +1 @@ | ||
FROM golang:onbuild | ||
FROM golang:1.4.1-onbuild |
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,4 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ $# -ne 1 ]; then | ||
echo "Usage: $0 tag" >/dev/stderr | ||
|
@@ -9,6 +10,10 @@ tag=$1 | |
|
||
tgt=$(mktemp -d) | ||
|
||
# Build flannel inside | ||
docker run -v `pwd`/../:/opt/flannel -i -t golang:1.4.1 /bin/bash -c "cd /opt/flannel && ./build" | ||
|
||
# Generate Dockerfile into target tmp dir | ||
cat <<DF >${tgt}/Dockerfile | ||
FROM quay.io/coreos/flannelbox:1.0 | ||
MAINTAINER Eugene Yakubovich <[email protected]> | ||
|
@@ -17,7 +22,10 @@ ADD ./mk-docker-opts.sh /opt/bin/ | |
CMD /opt/bin/flanneld | ||
DF | ||
|
||
# Copy artifcats into target dir and build the image | ||
cp ../bin/flanneld $tgt | ||
cp ../dist/mk-docker-opts.sh $tgt | ||
cp ./mk-docker-opts.sh $tgt | ||
docker build -t quay.io/coreos/flannel:${tag} $tgt | ||
|
||
# Cleanup | ||
rm -rf $tgt |
File renamed without changes.