File tree Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 3
3
Ondro Mihalyi <
[email protected] > (@ondromih)
4
4
GitRepo: https://github.com/OmniFish-EE/docker-library-glassfish.git
5
5
GitFetch: refs/heads/main
6
- GitCommit: 12efd43d7633d89cb28edf3a5b0cf3c12ac31c1f
6
+ GitCommit: 3e22307467c6f9557077f9eb4d481e3ede8df30f
7
7
8
8
Tags: 7.0.0, 7.0.0-jdk17, 7.0.0-jdk17-eclipse-temurin
9
9
Architectures: amd64
Original file line number Diff line number Diff line change @@ -5,17 +5,23 @@ serverImage="$1"
5
5
containerId=" $( docker run -d " $serverImage " ) "
6
6
trap " docker rm -vf $containerId > /dev/null" EXIT
7
7
8
- logLine=' ^\s+Eclipse GlassFish\s+[\.0-9]+'
9
- timeout=60
8
+ waitForLogLine () {
9
+ timeout=" $1 " ;
10
+ logLine=" $2 " ;
11
+ until docker logs $containerId 2>&1 | grep -q -E " $logLine "
12
+ do
13
+ if [ $timeout -eq 0 ]
14
+ then
15
+ exit 100;
16
+ fi
17
+ sleep 1
18
+ timeout=$(( timeout- 1 ))
19
+ done
20
+ }
10
21
11
- until docker logs $containerId 2>&1 | grep -q -E " $logLine "
12
- do
13
- if [ $timeout -eq 0 ]
14
- then
15
- exit 100;
16
- fi
17
- sleep 1
18
- timeout=$(( timeout- 1 ))
19
- done
22
+ waitForLogLine 60 ' ^\s+Eclipse GlassFish\s+[\.0-9]+' ;
23
+ echo " GlassFish started as ${containerId} "
20
24
21
- echo " Success!"
25
+ docker stop " ${containerId} " &
26
+ waitForLogLine 30 ' ^\s+Completed shutdown of GlassFish runtime' ;
27
+ echo " GlassFish stopped OK!"
You can’t perform that action at this time.
0 commit comments