aboutsummaryrefslogtreecommitdiff
path: root/bookworm-amd64/build.sh
blob: 131c34ce23a7a849543bb146946dcbed590393f1 (plain)
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
#!/bin/sh

set -e

trap cleanup_exit INT TERM EXIT

cleanup_exit()
{
  rm -f *.list *.key
}

export LANG=C

DISTRIBUTION=$(basename ${PWD} | cut -f1 -d '-')
ARCHITECTURE=$(basename ${PWD} | cut -f2 -d '-')

image=linaro/jenkins-${ARCHITECTURE}-debian:${DISTRIBUTION}

if [ ! -e Dockerfile ]
then
    cp ../${DISTRIBUTION}-amd64/Dockerfile .
fi

docker build --pull --tag=$image .
echo $image > .docker-tag