This repository has been archived by the owner on May 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
build-all.sh
executable file
·45 lines (38 loc) · 1.18 KB
/
build-all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
#
# Build armv7l Ubuntu base images for docker (on x86 as well as armhf machines)
# - needs qemu-user-static installed
#
# The following distributions will be built:
# * 14.04, trusty
# * 13.10, saucy
# * 12.04, precise
#
# Synopsis: build-all.sh [IMAGE NAME]
#
# Defaults: build-all.sh <YOUR-DOCKER-USER>/armhf-ubuntu
# Fail on error
set -e
if [ -n "$1" ]; then
IMAGE_NAME=$1
else
DOCKER_USER=$(sudo docker info | grep Username | awk '{print $2;}')
IMAGE_NAME=$DOCKER_USER/armhf-ubuntu
fi
echo Using $IMAGE_NAME as a base image name
./build.sh 14.04 $IMAGE_NAME
sudo docker push $IMAGE_NAME:14.04
sudo docker tag -f $IMAGE_NAME:14.04 $IMAGE_NAME:latest
sudo docker push $IMAGE_NAME:latest
sudo docker tag -f $IMAGE_NAME:14.04 $IMAGE_NAME:trusty
sudo docker push $IMAGE_NAME:trusty
./build.sh 13.10
sudo docker push $IMAGE_NAME:13.10
sudo docker tag -f $IMAGE_NAME:13.10 $IMAGE_NAME:saucy
sudo docker push $IMAGE_NAME:saucy
./build.sh 12.04.4
sudo docker tag -f $IMAGE_NAME:12.04.4 $IMAGE_NAME:12.04
sudo docker push $IMAGE_NAME:12.04
sudo docker tag -f $IMAGE_NAME:12.04.4 $IMAGE_NAME:precise
sudo docker push $IMAGE_NAME:precise
echo Successfully pushed all images to $IMAGE_NAME