]>
Commit | Line | Data |
---|---|---|
881d45dc JS |
1 | #!/bin/bash |
2 | . /usr/lib/docker-shell-scripts-lib/tag.sh | |
3 | . /usr/lib/docker-shell-scripts-lib/get-id.sh | |
4 | . /usr/lib/docker-shell-scripts-lib/preparation.sh | |
5 | . /usr/lib/docker-shell-scripts-lib/logging.sh | |
6 | . /usr/lib/docker-shell-scripts-lib/install.sh | |
7 | ||
8 | ### | |
9 | ### Build the pbs Dockerimage | |
10 | ### | |
11 | ||
12 | ### preparation ### | |
13 | # cd into script dir | |
14 | (cd $(dirname -- "$(readlink -e -- "$BASH_SOURCE")") || exit | |
15 | ||
16 | # check for all necessary files | |
17 | ||
18 | CheckForFile "setup-org.sh" | |
19 | CheckForFile "Dockerfile" | |
20 | ||
21 | #create a work copy of setup.sh | |
22 | cp setup-org.sh setup.sh | |
23 | ### paramter for mariadb build | |
24 | repo="ipfire-pbs" | |
25 | dockertag="new" | |
26 | username=jonatanschlag | |
27 | tag="${username}/${repo}:${dockertag}" | |
28 | ### Build the docker image | |
29 | docker build --no-cache=true -t "$tag" . | |
30 | ### Tag the docker image | |
31 | back=$(tag-image "${username}/${repo}") | |
32 | ||
33 | if [ "error" = "$back" ]; then | |
34 | echo "Tagging was not successful" | |
35 | fi | |
36 | rm -f setup.sh | |
37 | ) |