Ai
4 Star 2 Fork 2

Gitee 极速下载/WebLogic

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/oracle/docker-images
克隆/下载
buildDockerImage.sh 3.20 KB
一键复制 编辑 原始数据 按行查看 历史
Bruno Borges 提交于 2017-10-12 08:25 +08:00 . Fix wrong license statement (#599)
#!/bin/bash
#
# Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#
# Author: steve.phillips@oracle.com
# Description: script to build a Docker image for Oracle Business Intelligence
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
usage() {
cat << EOF
Usage: buildDockerImage.sh -v [version] [-s] [-c] [-q]
Builds a Docker Image for Oracle Business Intelligence.
Parameters:
-v: version to build. Required.
Choose one of: $(for i in $(ls -d */); do echo -n "${i%%/} "; done)
-c: enables Docker image layer cache during build
-s: skips the MD5 check of packages
-q: squash resulting image
LICENSE UPL 1.0
Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
EOF
exit 0
}
# Validate packages
checksumPackages() {
echo "Checking if required packages are present and valid..."
md5sum -c Checksum.md5
if [ "$?" -ne 0 ]; then
echo "MD5 for required packages to build this image did not match!"
echo "Make sure to download missing files in folder $VERSION. See *.download files for more information"
exit $?
fi
}
if [ "$#" -eq 0 ]; then usage; fi
# Parameters
VERSION="12.2.1"
SKIPMD5=0
NOCACHE=true
SQUASH=""
while getopts "qhcsv:" optname; do
case "$optname" in
"q")
SQUASH="--squash"
;;
"h")
usage
;;
"s")
SKIPMD5=1
;;
"v")
VERSION="$OPTARG"
;;
"c")
NOCACHE=false
;;
*)
# Should not occur
echo "Unknown error while processing options inside buildDockerImage.sh"
;;
esac
done
# Image Name
IMAGE_NAME="oracle/biplatform:$VERSION"
# Go into version folder
cd $VERSION
if [ ! "$SKIPMD5" -eq 1 ]; then
checksumPackages
else
echo "Skipped MD5 checksum."
fi
echo "====================="
# Proxy settings
PROXY_SETTINGS=""
if [ "${http_proxy}" != "" ]; then
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg http_proxy=${http_proxy}"
fi
if [ "${https_proxy}" != "" ]; then
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg https_proxy=${https_proxy}"
fi
if [ "${ftp_proxy}" != "" ]; then
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg ftp_proxy=${ftp_proxy}"
fi
if [ "${no_proxy}" != "" ]; then
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg no_proxy=${no_proxy}"
fi
if [ "$PROXY_SETTINGS" != "" ]; then
echo "Proxy settings were found and will be used during build."
fi
# ################## #
# BUILDING THE IMAGE #
# ################## #
echo "Building image '$IMAGE_NAME' ..."
# BUILD THE IMAGE (replace all environment variables)
BUILD_START=$(date '+%s')
docker build --force-rm=$NOCACHE --no-cache=$NOCACHE $SQUASH $PROXY_SETTINGS -t $IMAGE_NAME -f Dockerfile . || {
echo "There was an error building the image."
exit 1
}
BUILD_END=$(date '+%s')
BUILD_ELAPSED=`expr $BUILD_END - $BUILD_START`
echo ""
if [ $? -eq 0 ]; then
cat << EOF
Oracle Business Intelligence Docker Image for version $VERSION is ready:
--> $IMAGE_NAME
Build completed in $BUILD_ELAPSED seconds.
EOF
else
echo "Oracle Business Intelligence Docker Image was NOT successfully created. Check the output and correct any reported problems with the docker build operation."
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/mirrors/WebLogic.git
git@gitee.com:mirrors/WebLogic.git
mirrors
WebLogic
WebLogic
main

搜索帮助