-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·27 lines (25 loc) · 1.02 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
#!/bin/sh
# ******************************************************************************
# Oracle WebLogic 12.2.1.4.0 Managed Server + Splunk Dockerfile.
#
# Since : Jun, 2022
# Author: Arnold Somogyi <[email protected]>
#
# Usage:
# $ ./build.sh build the image locally
# $ ./build.sh true build and push the image to the image registry
#
# Copyright (c) 2020-2022 Remal Software and Arnold Somogyi All rights reserved
# BSD (2-clause) licensed
# ******************************************************************************
DOCKER_REGISTRY=docker
DOCKER_REGISTRY_NAMESPACE=remal
IMAGE_NAME=oracle-weblogic-managed-with-splunk
IMAGE_VERSION=2.1.0
PUSH_IMAGE=${1:-false}
docker build --no-cache -t "$DOCKER_REGISTRY/$DOCKER_REGISTRY_NAMESPACE/$IMAGE_NAME":"$IMAGE_VERSION" .
docker rmi "$(docker image ls -qf dangling=true)"
if [ "$PUSH_IMAGE" = "true" ] ; then
echo "pushing the image to the registry..."
docker push "$DOCKER_REGISTRY/$DOCKER_REGISTRY_NAMESPACE/$IMAGE_NAME":"$IMAGE_VERSION"
fi