[UPDATE] - oracle 8.X
This commit is contained in:
@@ -1,19 +1,36 @@
|
||||
FROM centos:${CentOsVersion}
|
||||
#FROM centos:${CentOsVersion}
|
||||
#FROM ${CentOsVersion}
|
||||
FROM ${Cible}:${VersionCible}
|
||||
LABEL maintainer='Guillaume Astier Ruiz'
|
||||
|
||||
ENV os='centos'
|
||||
ENV osversion='7'
|
||||
ENV os="${Cible}"
|
||||
ENV osversion="${VersionCible}"
|
||||
ENV ESL-TOOLS=repo
|
||||
ENV TERM=xterm
|
||||
|
||||
RUN yum update -y
|
||||
|
||||
|
||||
|
||||
RUN yum install yum-utils createrepo vim wget -y
|
||||
RUN yum install epel-release -y
|
||||
COPY ./bin/sync.sh /usr/local/bin/sync.sh
|
||||
RUN chmod 755 /usr/local/bin/sync.sh
|
||||
COPY ./bin/empty.sh /usr/local/bin/empty.sh
|
||||
RUN chmod 755 /usr/local/bin/empty.sh
|
||||
RUN yum install epel-release -y
|
||||
RUN yum install screen -y
|
||||
#COPY ./bin/sync.sh /usr/local/bin/sync.sh
|
||||
COPY ./bin/ /usr/local/bin/
|
||||
#RUN chmod 755 /usr/local/bin/sync.sh
|
||||
RUN chmod 755 /usr/local/bin/*
|
||||
#COPY ./bin/empty.sh /usr/local/bin/empty.sh
|
||||
#RUN chmod 755 /usr/local/bin/empty.sh
|
||||
|
||||
|
||||
|
||||
RUN yum install openssl -y
|
||||
RUN groupadd esl -g 1000
|
||||
RUN useradd -s /bin/bash -g 1000 -u 1000 -p "$(/usr/bin/openssl passwd -1 esl)" esl
|
||||
RUN mkdir /data
|
||||
RUN chown -R esl:esl /data
|
||||
USER esl
|
||||
|
||||
|
||||
CMD ${Run} ${RunArg}
|
||||
#ENTRYPOINT [ "${Run}" "${RunArg}" ]
|
||||
|
||||
@@ -6,5 +6,6 @@ services:
|
||||
image: esl-repo:${RepoVers}
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ./log:/tmp/log
|
||||
- ./bin:/usr/local/bin
|
||||
|
||||
|
||||
+8
-5
@@ -54,8 +54,9 @@ DeleteFile() {
|
||||
|
||||
DockerConnect() {
|
||||
|
||||
Inst=$(docker ps|grep $(dirname .)_esl\-$1 | awk '{print $NF}')
|
||||
docker exec -ti ${Inst} bash
|
||||
Inst=$(docker ps|grep "esl-$1" | awk '{print $NF}')
|
||||
[[ -z "${Inst}" ]] && docker run -ti -v $(realpath $(dirname $0))/data:/data -u esl esl\-${1}:1 bash || docker exec -ti ${Inst} bash
|
||||
echo DEBUG $Inst $1
|
||||
|
||||
}
|
||||
DockerPs() {
|
||||
@@ -67,7 +68,7 @@ DockerPs() {
|
||||
|
||||
|
||||
DockerStop() {
|
||||
for DockerRun in $(docker ps|grep $(dirname .)_esl\- | awk '{print $NF}')
|
||||
for DockerRun in $(docker ps|grep esl\- | awk '{print $NF}')
|
||||
do
|
||||
echo -n "Stop $DockerRun ... :"
|
||||
docker stop $DockerRun &> /dev/null
|
||||
@@ -122,8 +123,10 @@ DockerComposeRun () {
|
||||
[[ -f ${Wai}/docker-compose.yml ]] && rm -f ${Wai}/docker-compose.yml
|
||||
[[ "$2" == "Print" ]] && Print="-d" || Print=""
|
||||
cp ${Wai}/Template/docker-compose.yml.$1 ${Wai}/docker-compose.yml
|
||||
echo -n "Starting DOCKER $1 ... : "
|
||||
yes | docker-compose up ${Print} --remove-orphans 2>&1 | tee /tmp/RunDocker-${1}.log &> /dev/null
|
||||
echo "Log is : log/${1} - use tail -f ./log/$1"
|
||||
docker run -ti -v $(realpath $(dirname $0))/data:/data -u esl esl-repo:1 /usr/local/bin/sync.sh
|
||||
#yes | docker-compose up ${Print} --remove-orphans 1>&1 | tee /tmp/RunDocker-${1}.log &> /dev/null
|
||||
##yes | docker-compose up ${Print} --remove-orphans
|
||||
Res $?
|
||||
echo "
|
||||
--------- Log Esl -----------
|
||||
|
||||
Reference in New Issue
Block a user