mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed issue #801 , support canal docker
This commit is contained in:
11
docker/image/alidata/bin/exec_rc_local.sh
Executable file
11
docker/image/alidata/bin/exec_rc_local.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${SKIP_EXEC_RC_LOCAL}" = "YES" ] ; then
|
||||
echo "skip /etc/rc.local: SKIP_EXEC_RC_LOCAL=${SKIP_EXEC_RC_LOCAL}"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "${DOCKER_DEPLOY_TYPE}" = "HOST" ] ; then
|
||||
echo "skip /etc/rc.local: DOCKER_DEPLOY_TYPE=${DOCKER_DEPLOY_TYPE}"
|
||||
exit
|
||||
fi
|
||||
6
docker/image/alidata/bin/lark-wait
Executable file
6
docker/image/alidata/bin/lark-wait
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
chown admin: -R /home/admin/
|
||||
source /alidata/lib/proc.sh
|
||||
waitterm
|
||||
27
docker/image/alidata/bin/main.sh
Executable file
27
docker/image/alidata/bin/main.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
[ -n "${DOCKER_DEPLOY_TYPE}" ] || DOCKER_DEPLOY_TYPE="VM"
|
||||
echo "DOCKER_DEPLOY_TYPE=${DOCKER_DEPLOY_TYPE}"
|
||||
|
||||
# run init scripts
|
||||
for e in $(ls /alidata/init/*) ; do
|
||||
[ -x "${e}" ] || continue
|
||||
echo "==> INIT $e"
|
||||
$e
|
||||
echo "==> EXIT CODE: $?"
|
||||
done
|
||||
|
||||
echo "==> INIT DEFAULT"
|
||||
service sshd start
|
||||
service crond start
|
||||
|
||||
#echo "check hostname -i: `hostname -i`"
|
||||
#hti_num=`hostname -i|awk '{print NF}'`
|
||||
#if [ $hti_num -gt 1 ];then
|
||||
# echo "hostname -i result error:`hostname -i`"
|
||||
# exit 120
|
||||
#fi
|
||||
|
||||
echo "==> INIT DONE"
|
||||
echo "==> RUN ${*}"
|
||||
exec "${@}"
|
||||
Reference in New Issue
Block a user