-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcreate-docker-image.sh
More file actions
executable file
·62 lines (48 loc) · 1.54 KB
/
create-docker-image.sh
File metadata and controls
executable file
·62 lines (48 loc) · 1.54 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
VERSION=""
if [ "$#" -eq 1 ]; then
VERSION=$1
echo "Using command line argument for version information: ${VERSION}"
else
echo "Retrieving version information from pom.xml file..."
VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[')
echo "Using version information: ${VERSION}"
fi
if [ "${VERSION}" = "@" ] || [ -z "${VERSION}" ]; then
echo "Could not determine the version information, define it by command line!"
echo " Use: distribute-package.sh <version string>"
exit -1
fi
#export TASK_TRACKER_BASE_URL=/apps/tasktracker
export TASK_TRACKER_BASE_URL=
mvn clean package
PACKAGE_DIR=tasktracker
rm -rf tmp
mkdir -p tmp/${PACKAGE_DIR}/bin
mkdir -p tmp/${PACKAGE_DIR}/logs
# NOTE: Adapt the following settings for your application
echo "# HTTPS server
server.ssl.enabled = false
server.port = 8080
# LDAP Settings
tasktracker.ldap.urls =
tasktracker.ldap.user.dn.pattern =
tasktracker.ldap.mgm.dn =
tasktracker.ldap.mgm.pw =
tasktracker.ldap.grp.filter =
spring.mail.host =
spring.mail.port =
spring.mail.username =
spring.mail.password =
spring.mail.properties.mail.smtp.auth = true
spring.mail.properties.mail.smtp.starttls.enable = true
company.name =
" > tmp/${PACKAGE_DIR}/application.properties
cp target/tasktracker*.jar tmp/${PACKAGE_DIR}/bin
cd tmp/${PACKAGE_DIR}/bin
ln -s $(ls tasktracker*.jar) tasktracker.jar
cd -
cp LICENSE tmp/${PACKAGE_DIR}/
cp README.md tmp/${PACKAGE_DIR}/
echo "Creating docker image..."
docker build . -t tasktracker:v${VERSION}