Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
koko
Project
Project
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
ops
koko
Commits
cefd072f
Commit
cefd072f
authored
Jun 25, 2019
by
wojiushixiaobai
Committed by
Eric_Lee
Jun 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update]更新dockerfile
parent
fe737ee9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
8 deletions
+81
-8
Dockerfile
Dockerfile
+7
-5
config_example.yml
cmd/config_example.yml
+61
-3
entrypoint.sh
entrypoint.sh
+13
-0
No files found.
Dockerfile
View file @
cefd072f
...
...
@@ -16,12 +16,14 @@ COPY --from=stage-build /go/src/github.com/jumpserver/koko/cmd/koko .
COPY
--from=stage-build /go/src/github.com/jumpserver/koko/cmd/locale/ locale
COPY
--from=stage-build /go/src/github.com/jumpserver/koko/cmd/static/ static
COPY
--from=stage-build /go/src/github.com/jumpserver/koko/cmd/templates/ templates
RUN
echo
>
config.yml
\
COPY
cmd/config_example.yml .
COPY
entrypoint.sh .
RUN
chmod
755 ./entrypoint.sh
\
&&
apk add
-U
tzdata
\
&&
cp
/usr/share/zoneinfo/Asia/Shanghai /etc/localtime
\
&&
echo
"Asia/Shanghai"
>
/etc/timezone
\
&&
apk del tzdata
&&
apk del tzdata
\
&&
rm
-rf
/var/cache/apk/
*
EXPOSE
2222
EXPOSE
5000
CMD
["./koko"]
EXPOSE
2222 5000
CMD
["./entrypoint.sh"]
cmd/config_example.yml
View file @
cefd072f
NAME
:
coco3
BOOTSTRAP_TOKEN
:
uuvdKUxvhW3v
# 项目名称, 会用来向Jumpserver注册, 识别而已, 不能重复
# NAME: {{ Hostname }}
# Jumpserver项目的url, api请求注册会使用
CORE_HOST
:
http://127.0.0.1:8080
LOG_LEVEL
:
INFO
# Bootstrap Token, 预共享秘钥, 用来注册coco使用的service account和terminal
# 请和jumpserver 配置文件中保持一致,注册完成后可以删除
BOOTSTRAP_TOKEN
:
<PleasgeChangeSameWithJumpserver>
# 启动时绑定的ip, 默认 0.0.0.0
# BIND_HOST: 0.0.0.0
# 监听的SSH端口号, 默认2222
# SSHD_PORT: 2222
# 监听的HTTP/WS端口号,默认5000
# HTTPD_PORT: 5000
# 项目使用的ACCESS KEY, 默认会注册,并保存到 ACCESS_KEY_STORE中,
# 如果有需求, 可以写到配置文件中, 格式 access_key_id:access_key_secret
# ACCESS_KEY: null
# ACCESS KEY 保存的地址, 默认注册后会保存到该文件中
# ACCESS_KEY_FILE: data/keys/.access_key
# 加密密钥
# SECRET_KEY: null
# 设置日志级别 [DEBUG, INFO, WARN, ERROR, FATAL, CRITICAL]
# LOG_LEVEL: INFO
# 日志存放的目录
# LOG_DIR: logs
# SSH白名单
# ALLOW_SSH_USER: all
# SSH黑名单, 如果用户同时在白名单和黑名单,黑名单优先生效
# BLOCK_SSH_USER:
# -
# 和Jumpserver 保持心跳时间间隔
# HEARTBEAT_INTERVAL: 5
# Admin的名字,出问题会提示给用户
# ADMINS: ''
# SSH连接超时时间 (default 15 seconds)
# SSH_TIMEOUT: 15
# 语言 [en,zh]
# LANGUAGE_CODE: zh
# SFTP的根目录, 可选 /tmp, Home其他自定义目录
# SFTP_ROOT: /tmp
# SFTP是否显示隐藏文件
# SFTP_SHOW_HIDDEN_FILE: false
# 是否复用和用户后端资产已建立的连接(用户不会复用其他用户的连接)
# REUSE_CONNECTION: true
entrypoint.sh
0 → 100644
View file @
cefd072f
#!/bin/sh
#
if
[
!
-f
"/opt/koko/config.yml"
]
;
then
cp
/opt/koko/config_example.yml /opt/koko/config.yml
sed
-i
'5d'
/opt/koko/config.yml
sed
-i
"5i CORE_HOST:
$CORE_HOST
"
/opt/koko/config.yml
sed
-i
"s/BOOTSTRAP_TOKEN: <PleasgeChangeSameWithJumpserver>/BOOTSTRAP_TOKEN:
$BOOTSTRAP_TOKEN
/g"
/opt/koko/config.yml
sed
-i
"s/# LOG_LEVEL: INFO/LOG_LEVEL: ERROR/g"
/opt/koko/config.yml
fi
cd
/opt/koko
./koko
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