]> git.ipfire.org Git - people/jschlag/pbs-docker.git/blob - src/pbs-manager/build.sh
Refactoring the structure of our images
[people/jschlag/pbs-docker.git] / src / pbs-manager / build.sh
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-manager 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 "Dockerfile"
19
20 ### paramter for mariadb build
21 repo="ipfire-pbs-manager"
22 dockertag="new"
23 username=jonatanschlag
24 tag="${username}/${repo}:${dockertag}"
25 ### Build the docker image
26 docker build --no-cache=true -t "$tag" .
27 ### Tag the docker image
28 back=$(tag-image "${username}/${repo}")
29
30 if [ "error" = "$back" ]; then
31 echo "Tagging was not successful"
32 fi
33 )