-
Notifications
You must be signed in to change notification settings - Fork 47
/
build.sh
executable file
·73 lines (62 loc) · 1.96 KB
/
build.sh
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
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/sh
# Set OnEarth version and release
. ./version.sh
# Detect CPU architecture
ARCH=$(uname -m)
DOCKER_PLATFORM_OPTION=""
if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then
DOCKER_PLATFORM_OPTION="--platform=linux/amd64"
fi
# Build the onearth-tile-services image
docker build \
$DOCKER_PLATFORM_OPTION \
--no-cache \
--build-arg ONEARTH_VERSION=$ONEARTH_VERSION \
-f ./docker/tile_services/Dockerfile \
-t nasagibs/onearth-tile-services:$ONEARTH_VERSION-$ONEARTH_RELEASE \
.
# Build the onearth-time-service image
docker build \
$DOCKER_PLATFORM_OPTION \
--no-cache \
--build-arg ONEARTH_VERSION=$ONEARTH_VERSION \
-f ./docker/time_service/Dockerfile \
-t nasagibs/onearth-time-service:$ONEARTH_VERSION-$ONEARTH_RELEASE \
.
# Build the onearth-capabilities image
docker build \
$DOCKER_PLATFORM_OPTION \
--no-cache \
--build-arg ONEARTH_VERSION=$ONEARTH_VERSION \
-f ./docker/capabilities/Dockerfile \
-t nasagibs/onearth-capabilities:$ONEARTH_VERSION-$ONEARTH_RELEASE \
.
# Build the onearth-reproject image
docker build \
$DOCKER_PLATFORM_OPTION \
--no-cache \
--build-arg ONEARTH_VERSION=$ONEARTH_VERSION \
-f ./docker/reproject/Dockerfile \
-t nasagibs/onearth-reproject:$ONEARTH_VERSION-$ONEARTH_RELEASE \
.
# Build the onearth-demo image
docker build \
$DOCKER_PLATFORM_OPTION \
--no-cache \
-f ./docker/demo/Dockerfile \
-t nasagibs/onearth-demo:$ONEARTH_VERSION-$ONEARTH_RELEASE \
.
# Build the onearth-wms image
docker build \
$DOCKER_PLATFORM_OPTION \
--build-arg ONEARTH_VERSION=$ONEARTH_VERSION \
-f ./docker/wms_service/Dockerfile \
-t nasagibs/onearth-wms:$ONEARTH_VERSION-$ONEARTH_RELEASE \
.
# Build the onearth-tools image
docker build \
$DOCKER_PLATFORM_OPTION \
--build-arg ONEARTH_VERSION=$ONEARTH_VERSION \
-f ./docker/tools/Dockerfile \
-t nasagibs/onearth-tools:$ONEARTH_VERSION-$ONEARTH_RELEASE \
.