Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-common
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jianshuqin
dc-common
Commits
900f97e9
Commit
900f97e9
authored
Mar 16, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
elastic-jobCD/CI
parent
5c93bec5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
12 deletions
+29
-12
Dockerfile
data-elastic-job/Dockerfile
+20
-12
entrypoint.sh
data-elastic-job/entrypoint.sh
+9
-0
No files found.
data-elastic-job/Dockerfile
View file @
900f97e9
FROM
maven:3.6.0-alpine
RUN
apk
update
&&
apk
add ca-certificates
&&
\
RUN
apk add ca-certificates
&&
\
apk add tzdata
&&
\
ln
-sf
/usr/share/zoneinfo/Asia/Shanghai /etc/localtime
&&
\
echo
"Asia/Shanghai"
>
/etc/timezone
# make source folder
RUN
mkdir
-p
/usr/app
WORKDIR
/usr/app
COPY
data-elastic-job /
# install maven dependency packages (keep in image)
ENV
VERSION 3.0.0.M1
ENV
CONSOLE_PATH data-elastic-job/elastic-job-lite-console
ENV
ROOT_USERNAME root
ENV
ROOT_PASSWORD root
ENV
GUEST_USERNAME guest
ENV
GUEST_PASSWORD guest
COPY
data-elastic-job /usr/app/data-elastic-job
RUN
mvn package
-DskipTests
-f
${
CONSOLE_PATH
}
/pom.xml
\
# 复制console包
&& mv ${CONSOLE_PATH}/target/elastic-job-lite-console-${VERSION}.tar.gz /elastic-job-lite-console-${VERSION}.tar.gz \
# 删除源码解压文件夹
&& rm -rf elastic-job-lite-${VERSION} \
# 解压console
&& tar -zxvf /elastic-job-lite-console-${VERSION}.tar.gz \
# 删除console压缩包
&& rm -rf /elastic-job-lite-console-${VERSION}.tar.gz
RUN
cd
"/usr/app/data-elastic-job"
&&
mvn install
-Dmaven
.test.skip
=
true
RUN
tar
-xzf
"/usr/app/data-elastic-job/elastic-job-lite-console/target/elastic-job-lite-console-3.0.0.M1-SNAPSHOT.tar.gz"
RUN
chmod +x
"/usr/app/data-elastic-job/elastic-job-lite-console/target/elastic-job-lite-console-3.0.0.M1-SNAPSHOT/bin/start.sh"
ADD
entrypoint.sh entrypoint.sh
#指定容器启动程序及参数 <ENTRYPOINT> "<CMD>"
EXPOSE
8899
RUN
chmod a+x /entrypoint.sh
ENTRYPOINT
["/usr/app/data-elastic-job/elastic-job-lite-console/target/elastic-job-lite-console-3.0.0.M1-SNAPSHOT/bin/start.sh"]
ENTRYPOINT
/entrypoint.sh
data-elastic-job/entrypoint.sh
0 → 100644
View file @
900f97e9
#!/bin/bash
# 修改认证配置文件
sed
-i
"s/root.username=root/root.username=
${
ROOT_USERNAME
}
/g"
elastic-job-lite-console-
${
VERSION
}
/conf/auth.properties
sed
-i
"s/root.password=root/root.password=
${
ROOT_PASSWORD
}
/g"
elastic-job-lite-console-
${
VERSION
}
/conf/auth.properties
sed
-i
"s/guest.username=guest/guest.username=
${
GUEST_USERNAME
}
/g"
elastic-job-lite-console-
${
VERSION
}
/conf/auth.properties
sed
-i
"s/guest.password=guest/guest.password=
${
GUEST_PASSWORD
}
/g"
elastic-job-lite-console-
${
VERSION
}
/conf/auth.properties
elastic-job-lite-console-
${
VERSION
}
/bin/start.sh
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment