-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename readme ln x6 environment x4 +x2 dvp-maven bin-aio --build-arg repo=$repo types with link pretty build
- Loading branch information
Showing
27 changed files
with
444 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# bindata | ||
|
||
merge aio, with diff tags | ||
|
||
## hotspot, zulu, nexus, tomcat | ||
|
||
- bin-aio:hotsopt-8u202 | ||
- bin-aio:zulu-8u252 | ||
- bin-aio:nexus-v271 | ||
- bin-aio:tomcat-v8.0.51 | ||
- bin-aio: | ||
- bin-aio: | ||
- bin-aio: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ARG repo=docker.io | ||
FROM ${repo}/infrastlabs/alpine-ext | ||
|
||
ARG url=http://10.1.1.114:680/temp_trans/pro_env | ||
ARG src=jdk-8u162-linux-x64.tar.gz | ||
ARG dest=/down | ||
#/jdk-8u162 | ||
|
||
USER root | ||
RUN wget --user=root --password=root $url/$src \ | ||
&& mkdir -p $dest && tar -zxf $src -C $dest \ | ||
&& rm -f $src | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
url=http://10.1.1.114:680/temp_trans/pro_env | ||
dest=/down | ||
|
||
function down(){ | ||
local src=$1 | ||
wget --user=root --password=root $url/$src | ||
mkdir -p $dest && tar -zxf $src -C $dest | ||
rm -f $src | ||
} | ||
|
||
#TODO case > switch($tag) | ||
# hotspot, zulu, nexus, tomcat | ||
src=jdk-8u162-linux-x64.tar.gz | ||
$down $src | ||
|
||
src=zulu-xxx.tar.gz | ||
$down $src | ||
|
||
src=nexus-2.7.1-01-bundle.tar.gz | ||
$down $src | ||
|
||
src=apache-tomcat-8.0.51.tar.gz | ||
$down $src | ||
|
||
|
||
rm -f /build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../build_img.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
#!/bin/bash | ||
#setenforce 0 | ||
cur_path=$(cd "$(dirname "$0")"; pwd) #&& echo $cur_path | ||
cmd=$1 && push=$2 && ver=$3 | ||
printf "entry params: [%s, %s, %s]\n" $cmd $push $ver | ||
|
||
source /etc/profile | ||
export |grep DOCKER_REG | ||
# repo=docker.io | ||
repo=registry.cn-shenzhen.aliyuncs.com | ||
echo "${DOCKER_REGISTRY_PW_infrastSubAcc2}" |docker login --username=${DOCKER_REGISTRY_USER_infrastSubAcc2} --password-stdin $repo | ||
|
||
function buildPushImg(){ | ||
local ns=$1 | ||
local image=$2 | ||
local push=$3 | ||
local version=$ver #$4 | ||
|
||
if [ "" = "$version" ]; then | ||
version=latest | ||
fi | ||
|
||
echo ">>>==============={{ "$image" }}>>>build:=========================================" | ||
docker build --pull -t $repo/$namespace/$image:$version --build-arg repo=$repo . | ||
|
||
if [ "push" = "$push" ]; then | ||
echo ">>>==============={{ "$image" }}>>>push:=========================================" | ||
docker push $repo/$namespace/$image:$version | ||
fi | ||
|
||
} | ||
|
||
function doOne(){ | ||
local mod=$1 && local ns=$2 && echo $ns | ||
|
||
#special | ||
array=( | ||
spe-special | ||
) | ||
echo "${array[@]}" | grep -wq "$mod" && ns="special" | ||
|
||
#default | ||
if [ "" = "$ns" ]; then | ||
ns="infrastlabs" | ||
fi | ||
cd $cur_path/$mod && buildPushImg "$ns" "$mod" "$push" | ||
} | ||
|
||
function callType(){ | ||
local cmd=$1 | ||
case "$cmd" in | ||
env) | ||
doOne env-java8-hotspot | ||
;; | ||
mid) | ||
doOne mid-elasticsearch | ||
;; | ||
sup) | ||
doOne sup-nexus #pub | ||
;; | ||
dvp) | ||
doOne dvp-jenkins | ||
doOne dvp-jnlp | ||
doOne dvp-maven | ||
;; | ||
all) | ||
doOne bin-aio #ns-binary | ||
|
||
callType bin | ||
callType env | ||
callType mid | ||
callType sup | ||
callType dvp | ||
|
||
#cnt=`expr $cnt + 1` #if [ $cnt -gt 0 ]; then #exit $? | ||
;; | ||
*) | ||
doOne $cmd | ||
exit $? | ||
;; | ||
esac | ||
} | ||
callType $cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../build_img.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG repo=docker.io | ||
FROM ${repo}/k-spe/top-jdk-openj9 | ||
MAINTAINER sam <[email protected]> | ||
|
||
USER root | ||
RUN mkdir /repository | ||
|
||
ADD *.sh / | ||
RUN sh /build.sh | ||
|
||
##run as root | ||
USER root | ||
WORKDIR / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
MAVEN_VERSION=3.5.4 | ||
|
||
# Add User | ||
useradd -m -d /home/jenkins -s /bin/bash jenkins | ||
|
||
# Install GIT | ||
apk add --no-cache git lftp | ||
|
||
# Install Maven | ||
wget -q http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
mkdir /usr/local/soft/maven | ||
tar xzf apache-maven-${MAVEN_VERSION}-bin.tar.gz -C /usr/local/soft/maven | ||
rm apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
ln -s /usr/local/soft/maven/apache-maven-${MAVEN_VERSION}/bin/mvn /usr/local/bin/mvn | ||
|
||
# Test | ||
mvn -v | ||
|
||
# env | ||
#ln -s /home/jenkins/.netrc /root/.netrc ##/home/jenkins | ||
|
||
#conf | ||
mvn_cnf="/usr/local/soft/maven/apache-maven-${MAVEN_VERSION}/conf" | ||
# mv $mvn_cnf/settings.xml $mvn_cnf/settings.xml00 | ||
# ln -s /somedir/settings.xml $mvn_cnf/settings.xml | ||
|
||
rm -f /build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# list | ||
|
||
- env-java8-hotspot | ||
- env-java8-openj9 | ||
- env-java8-zulu | ||
- env-java8-jvms | ||
- | ||
- env-java8-sboot | ||
- env-java8-tomcat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../build_img.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
ARG repo=docker.io | ||
FROM ${repo}/infrastlabs/bin-aio:hotsopt-8u202 | ||
MAINTAINER sam <[email protected]> | ||
ARG src=jdk-8u162-linux-x64.tar.gz | ||
ARG dest=/usr/local/soft/java | ||
|
||
USER root | ||
#RUN wget --user=root --password=root http://10.1.1.114:680/temp_trans/pro_env/$src \ | ||
# && mkdir -p $dest && tar -zxf $src -C $dest \ | ||
# && rm -f $src | ||
|
||
ADD *.sh / | ||
RUN sh /build.sh | ||
|
||
##run as root | ||
USER root | ||
WORKDIR / | ||
|
||
ENV JAVA_HOME=$dest/jdk1.8.0_162 \ | ||
PATH="$dest/jdk1.8.0_162/bin:$dest/jdk1.8.0_162/jre/bin:$PATH" | ||
|
||
# | ||
ENV JAVA_TOOL_OPTIONS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
src=jdk-8u202-linux-x64.tar.gz | ||
dest=/usr/local/soft/java | ||
|
||
#wget --user=root --password=root http://10.1.1.114:680/temp_trans/pro_env/$src | ||
#mkdir -p $dest && tar -zxf $src -C $dest | ||
#rm -f $src | ||
|
||
###ENV | ||
echo "set /etc/profile JAVA_ENV" | ||
cat >>/etc/profile<<EOF | ||
JAVA_HOME=$dest/jdk1.8.0_202 | ||
CLASSPATH=.:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib/tools.jar | ||
PATH=\$JAVA_HOME/bin:\$JAVA_HOME/jre/bin:\$PATH | ||
export JAVA_HOME CLASSPATH PATH | ||
EOF | ||
|
||
ln -s $dest/jdk1.8.0_202 /usr/local/java | ||
|
||
#ENV JAVA_HOME=$dest/jdk1.8.0_202 \ | ||
# PATH="$dest/jdk1.8.0_202/bin:$PATH" | ||
#TODO tobeTest: JAVA_TOOL_OPTIONS | ||
#ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+UseContainerSupport -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle" | ||
|
||
rm -f /build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
ARG repo=docker.io | ||
FROM ${repo}/infrastlabs/env-java8-openj9 as openj9 | ||
FROM ${repo}/infrastlabs/env-java8-hotspot as hotspot | ||
FROM ${repo}/infrastlabs/env-java8-zulu as zulu | ||
# FROM registry.cn-shenzhen.aliyuncs.com/k-spe/top-alpine | ||
FROM registry.cn-shenzhen.aliyuncs.com/infrastlabs/alpine-ext:weak | ||
MAINTAINER sam <[email protected]> | ||
|
||
ENV APP_JVM=openj9 | ||
USER root | ||
COPY --from=openj9 /usr/local/soft/java/openjdk /usr/local/soft/java/openjdk | ||
COPY --from=hotspot /usr/local/soft/java/jdk1.8.0_202 /usr/local/soft/java/jdk1.8.0_202 | ||
|
||
ADD *.sh / | ||
RUN sh /build.sh | ||
|
||
##run as root | ||
USER root | ||
WORKDIR / | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
cat > /etc/source-openj9 <<EOF | ||
#jdk8u202-b08 | ||
export JAVA_VERSION=jdk8u192-b12_openj9-0.11.0 | ||
export JAVA_HOME==/usr/local/soft/java/openjdk | ||
export PATH="\$JAVA_HOME/bin:\$PATH" | ||
export JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+UseContainerSupport -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle" | ||
EOF | ||
|
||
cat > /etc/source-hotspot <<EOF | ||
#hotspot-8u202 | ||
export JAVA_HOME==/usr/local/soft/java/jdk1.8.0_202 | ||
export PATH="\$JAVA_HOME/bin:\$JAVA_HOME/jre/bin:\$PATH" | ||
export JAVA_TOOL_OPTIONS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap" | ||
EOF | ||
|
||
##console | ||
cat >> /etc/profile <<EOF | ||
##jvm | ||
if [ "openj9" = "\$APP_JVM" ]; then | ||
source /etc/source-openj9 | ||
else | ||
source /etc/source-hotspot | ||
fi | ||
EOF | ||
|
||
rm -f /build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM adoptopenjdk/openjdk8-openj9:jdk8u252-b09_openj9-0.20.0-alpine-slim as openj9 | ||
ARG repo=docker.io | ||
FROM ${repo}/infrastlabs/alpine-ext | ||
MAINTAINER sam <[email protected]> | ||
|
||
USER root | ||
COPY --from=openj9 /opt/java/openjdk /usr/local/soft/java/openjdk | ||
|
||
##run as root | ||
USER root | ||
WORKDIR / | ||
|
||
#ENV JAVA_VERSION jdk8u192-b12_openj9-0.11.0 | ||
ENV JAVA_HOME=/usr/local/soft/java/openjdk \ | ||
PATH="/usr/local/soft/java/openjdk/bin:$PATH" | ||
ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+UseContainerSupport -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle" | ||
RUN echo "PATH=\$JAVA_HOME/bin:\$PATH" >> /etc/profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG repo=docker.io | ||
FROM ${repo}/infrastlabs/env-java8-jvms | ||
MAINTAINER sam <[email protected]> | ||
|
||
USER root | ||
|
||
ADD *.sh / | ||
RUN sh /build.sh | ||
|
||
##run as www | ||
USER www | ||
WORKDIR / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
#add user | ||
mkdir -p /data | ||
useradd -m -d /data/www -s /bin/bash www | ||
#gosuctl add www in dtl-app-dockerfile | ||
|
||
#init dir | ||
chown -R www:www /data/www/ | ||
# mkdir -p /opt/appdata /data/www/{app,log} | ||
# chown -R www:www /opt/appdata | ||
|
||
#apollo | ||
# mkdir -p /opt/data && chown www:www -R /opt/data | ||
|
||
rm -f /build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM registry.cn-shenzhen.aliyuncs.com/k-pub/app-bindata:bd-tomcat as src | ||
|
||
ARG repo=docker.io | ||
FROM ${repo}/infrastlabs/env-java8-jvms | ||
MAINTAINER sam <[email protected]> | ||
|
||
USER root | ||
RUN mkdir -p /data && useradd -m -d /data/www -s /bin/bash www | ||
COPY --chown=www:www --from=src /down/apache-tomcat-8.0.51 /data/www/app | ||
ADD *.sh / | ||
RUN sh /build.sh | ||
|
||
##run as www | ||
USER www | ||
WORKDIR / |
Oops, something went wrong.