forked from bersler/OpenLogReplicator-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-prod.sh
More file actions
executable file
·34 lines (31 loc) · 1.48 KB
/
Copy pathbuild-prod.sh
File metadata and controls
executable file
·34 lines (31 loc) · 1.48 KB
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
#!/bin/sh
# Script to build Docker images
# Copyright (C) 2018-2022 Adam Leszczynski (aleszczynski@bersler.com)
#
# This file is part of OpenLogReplicator
#
# Open Log Replicator is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# Open Log Replicator is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Open Log Replicator; see the file LICENSE.txt If not see
# <http://www.gnu.org/licenses/>.
USER=`whoami`
GIDOLR=${GIDOLR:=`id -r -g ${USER}`}
UIDOLR=${UIDOLR:=`id -r -u ${USER}`}
GIDORA=${GIDORA:=54322}
BASE_IMAGE=${BASE_IMAGE:=debian}
BASE_VERSION=${BASE_VERSION:=11.0}
TAG=${TAG:=bersler/openlogreplicator:${BASE_IMAGE}-${BASE_VERSION}-dev}
if [ "$GIDOLR" -eq "0" ] || [ "$UIDOLR" -eq "0" ]; then
echo "Failed, you are not allowed to run OpenLogReplicator as root"
exit 1
fi
docker build -t ${TAG} -f Dockerfile --build-arg IMAGE=${BASE_IMAGE} --build-arg VERSION=${BASE_VERSION} --build-arg GIDOLR=${GIDOLR} --build-arg UIDOLR=${UIDOLR} --build-arg GIDORA=${GIDORA} --build-arg WITHORACLE=1 --build-arg WITHKAFKA=1 --build-arg WITHPROTOBUF=1 --build-arg BUILD_TYPE=Release .