-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild
executable file
·43 lines (37 loc) · 931 Bytes
/
build
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
#!/bin/bash
#
# Builds the container image.
#
# Always uses the most recent version of the parent image.
#
# Arguments to this script are passed to the underlying "docker build"
# command.
#
#
# Assumes that "fetch-jetty" has already been run to acquire the
# Jetty distribution.
#
. VERSIONS
#
# Create empty overlay directories if they don't already exist.
#
mkdir -p overlay/jetty-base-${JETTY_BASE_VERSION}
#
# Package the overlays. This allows us to be sure that they can
# be pulled into the image even if the overlay directories are
# actually symbolic links.
#
OVERLAY_DIR=`pwd`/overlay
pushd ${OVERLAY_DIR}/jetty-base-${JETTY_BASE_VERSION}
tar --create --file ${OVERLAY_DIR}/jetty-base-${JETTY_BASE_VERSION}.tar .
popd
#
# Build the image.
#
docker build --build-arg JAVA_VERSION=$JAVA_VERSION \
--build-arg JETTY_BASE_VERSION=$JETTY_BASE_VERSION \
--pull --no-cache \
$@ -t ${IMAGE_NAME} .
#
# End.
#