summaryrefslogtreecommitdiff
path: root/docker/alpine/build.sh
blob: 40ed1194fe6cb23514352d146a30ec2f689b6f0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

set -e
set -v
set -x

##
# commit must be converted to decimal
##
c=`git rev-parse --short=10 HEAD`
commit=`printf '%u\n' 0x$c`
docker build -f docker/alpine/Dockerfile \
	--build-arg commit=$commit -t frr:alpine-$c .
id=`docker create frr:alpine-$c`
docker cp ${id}:/pkgs/ docker
docker rm $id
docker rmi frr:alpine-$c