-
Notifications
You must be signed in to change notification settings - Fork 134
/
Copy pathbuild-docker-image.sh
executable file
·35 lines (26 loc) · 1.2 KB
/
build-docker-image.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
#!/bin/bash
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
export ROOT_DIR=$(cd $(dirname $0)/../..; pwd)
docker kill okit
docker rmi okit
echo "*******************************************************************"
echo "** **"
echo "** Building OL7 Image **"
echo "** **"
echo "*******************************************************************"
docker build \
--tag okit \
--file ${ROOT_DIR}/containers/docker/Dockerfile \
--force-rm \
${ROOT_DIR}
for dangling in $(docker images -f "dangling=true" -q)
do
docker rmi ${dangling}
done
docker images
echo "*******************************************************************"
echo "** **"
echo "** okit Build Complete **"
echo "** **"
echo "*******************************************************************"