Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docker-image
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tools
docker-image
Commits
02d11487
Commit
02d11487
authored
Apr 03, 2020
by
caiyanming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade zookeeper to 3.6.0
Change-Id: Ie484da5349e1b85e7e4bba2f8957c02a2fcfd6d7
parent
49660f8c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
25 deletions
+47
-25
zookeeper/Dockerfile
zookeeper/Dockerfile
+28
-11
zookeeper/docker-entrypoint.sh
zookeeper/docker-entrypoint.sh
+19
-14
No files found.
zookeeper/Dockerfile
View file @
02d11487
FROM
registry-vpc.cn-hangzhou.aliyuncs.com/schbrain/jdk:8u172
MAINTAINER
xt
FROM
registry-vpc.cn-hangzhou.aliyuncs.com/schbrain/jdk:8u172-1.0
ENV
ZOO_CONF_DIR=/conf \
ZOO_DATA_DIR=/data \
...
...
@@ -36,19 +35,37 @@ RUN set -eux; \
# Verify that gosu binary works
gosu nobody true
ARG
GPG_KEY=
3F7A1D16FA4217B1DC75E1C9FFE35B7F15DFA1BA
ARG
SHORT_DISTRO_NAME=zookeeper-3.
5.5
ARG
DISTRO_NAME=apache-zookeeper-3.
5.5
-bin
ARG
GPG_KEY=
BBE7232D7991050B54C8EA0ADC08637CA615D22C
ARG
SHORT_DISTRO_NAME=zookeeper-3.
6.0
ARG
DISTRO_NAME=apache-zookeeper-3.
6.0
-bin
# Download Apache Zookeeper, verify its PGP signature, untar and clean up
RUN
set
-eux
;
\
wget
-q
"https://www.apache.org/dist/zookeeper/
$SHORT_DISTRO_NAME
/
$DISTRO_NAME
.tar.gz"
;
\
wget
-q
"https://www.apache.org/dist/zookeeper/
$SHORT_DISTRO_NAME
/
$DISTRO_NAME
.tar.gz.asc"
;
\
ddist
()
{
\
local
f
=
"
$1
"
;
shift
;
\
local
distFile
=
"
$1
"
;
shift
;
\
local
success
=
;
\
local
distUrl
=
;
\
for
distUrl
in
\
'https://www.apache.org/dyn/closer.cgi?action=download&filename='
\
https://www-us.apache.org/dist/
\
https://www.apache.org/dist/
\
https://archive.apache.org/dist/
\
;
do
\
if
wget
-q
-O
"
$f
"
"
$distUrl$distFile
"
&&
[
-s
"
$f
"
]
;
then
\
success
=
1
;
\
break
;
\
fi
;
\
done
;
\
[
-n
"
$success
"
]
;
\
}
;
\
ddist
"
$DISTRO_NAME
.tar.gz"
"zookeeper/
$SHORT_DISTRO_NAME
/
$DISTRO_NAME
.tar.gz"
;
\
ddist
"
$DISTRO_NAME
.tar.gz.asc"
"zookeeper/
$SHORT_DISTRO_NAME
/
$DISTRO_NAME
.tar.gz.asc"
;
\
export
GNUPGHOME
=
"
$(
mktemp
-d
)
"
;
\
gpg
--keyserver
ha.pool.sks-keyservers.net
--recv-key
"
$GPG_KEY
"
||
\
gpg
--keyserver
pgp.mit.edu
--recv-keys
"
$GPG_KEY
"
||
\
gpg
--keyserver
keyserver.pgp.com
--recv-keys
"
$GPG_KEY
"
;
\
gpg
--batch
--verify
"
$DISTRO_NAME
.tar.gz.asc"
"
$DISTRO_NAME
.tar.gz"
;
\
#
gpg --keyserver ha.pool.sks-keyservers.net --recv-key "$GPG_KEY" ||
\
#
gpg --keyserver pgp.mit.edu --recv-keys "$GPG_KEY" ||
\
#
gpg --keyserver keyserver.pgp.com --recv-keys "$GPG_KEY";
\
#
gpg --batch --verify "$DISTRO_NAME.tar.gz.asc" "$DISTRO_NAME.tar.gz";
\
tar
-zxf
"
$DISTRO_NAME
.tar.gz"
;
\
mv
"
$DISTRO_NAME
/conf/"
*
"
$ZOO_CONF_DIR
"
;
\
rm
-rf
"
$GNUPGHOME
"
"
$DISTRO_NAME
.tar.gz"
"
$DISTRO_NAME
.tar.gz.asc"
;
\
...
...
zookeeper/docker-entrypoint.sh
View file @
02d11487
...
...
@@ -11,20 +11,20 @@ fi
# Generate the config only if it doesn't exist
if
[[
!
-f
"
$ZOO_CONF_DIR
/zoo.cfg"
]]
;
then
CONFIG
=
"
$ZOO_CONF_DIR
/zoo.cfg"
echo
"dataDir=
$ZOO_DATA_DIR
"
>>
"
$CONFIG
"
echo
"dataLogDir=
$ZOO_DATA_LOG_DIR
"
>>
"
$CONFIG
"
echo
"tickTime=
$ZOO_TICK_TIME
"
>>
"
$CONFIG
"
echo
"initLimit=
$ZOO_INIT_LIMIT
"
>>
"
$CONFIG
"
echo
"syncLimit=
$ZOO_SYNC_LIMIT
"
>>
"
$CONFIG
"
echo
"autopurge.snapRetainCount=
$ZOO_AUTOPURGE_SNAPRETAINCOUNT
"
>>
"
$CONFIG
"
echo
"autopurge.purgeInterval=
$ZOO_AUTOPURGE_PURGEINTERVAL
"
>>
"
$CONFIG
"
echo
"maxClientCnxns=
$ZOO_MAX_CLIENT_CNXNS
"
>>
"
$CONFIG
"
echo
"standaloneEnabled=
$ZOO_STANDALONE_ENABLED
"
>>
"
$CONFIG
"
echo
"admin.enableServer=
$ZOO_ADMINSERVER_ENABLED
"
>>
"
$CONFIG
"
{
echo
"dataDir=
$ZOO_DATA_DIR
"
echo
"dataLogDir=
$ZOO_DATA_LOG_DIR
"
echo
"tickTime=
$ZOO_TICK_TIME
"
echo
"initLimit=
$ZOO_INIT_LIMIT
"
echo
"syncLimit=
$ZOO_SYNC_LIMIT
"
echo
"autopurge.snapRetainCount=
$ZOO_AUTOPURGE_SNAPRETAINCOUNT
"
echo
"autopurge.purgeInterval=
$ZOO_AUTOPURGE_PURGEINTERVAL
"
echo
"maxClientCnxns=
$ZOO_MAX_CLIENT_CNXNS
"
echo
"standaloneEnabled=
$ZOO_STANDALONE_ENABLED
"
echo
"admin.enableServer=
$ZOO_ADMINSERVER_ENABLED
"
}
>>
"
$CONFIG
"
if
[[
-z
$ZOO_SERVERS
]]
;
then
ZOO_SERVERS
=
"server.1=localhost:2888:3888;2181"
fi
...
...
@@ -32,6 +32,11 @@ if [[ ! -f "$ZOO_CONF_DIR/zoo.cfg" ]]; then
for
server
in
$ZOO_SERVERS
;
do
echo
"
$server
"
>>
"
$CONFIG
"
done
if
[[
-n
$ZOO_4LW_COMMANDS_WHITELIST
]]
;
then
echo
"4lw.commands.whitelist=
$ZOO_4LW_COMMANDS_WHITELIST
"
>>
"
$CONFIG
"
fi
fi
# Write myid only if it doesn't exist
...
...
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