diff --git a/entrypoint.sh b/entrypoint.sh index c5e061c..869888d 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,15 +1,15 @@ #!/bin/bash -if [ -n "$ROOT_PASSWD" ]; then - echo "root:${ROOT_PASSWD}" | chpasswd - echo "密码设置完毕" >> /root/info.log -fi +# if [ -n "$ROOT_PASSWD" ]; then + # echo "root:${ROOT_PASSWD}" | chpasswd + # echo "密码设置完毕" >> /root/info.log +# fi -if [ -e "/root/.gitconfig" ]; then - echo "git配置文件已存在" >> /root/info.log +if [ -e "/home/coder/.gitconfig" ]; then + echo "git配置文件已存在" >> /tmp/log/info.log else - touch /root/.gitconfig - echo "git配置文件已创建" >> /root/info.log + touch /home/coder/.gitconfig + echo "git配置文件已创建" >> /tmp/log/info.log fi # git使用openssh的shh程序 @@ -18,18 +18,18 @@ git config --global core.sshCommand "/usr/bin/ssh" if [ -n "$GIT_USER" ] && [ -n "$GIT_EMAIL" ]; then git config --global user.name "$GIT_USER" git config --global user.email "$GIT_EMAIL" - echo "git 用户已设置完毕" >> /root/info.log + echo "git 用户已设置完毕" >> /tmp/log/info.log fi if [ -n "$DOCKER_USER" ] && [ -n "$DOCKER_PASSWD" ]; then docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWD" - echo "docker 用户登录完成" >> /root/info.log + echo "docker 用户登录完成" >> /tmp/log/info.log fi -service ssh start >> /root/info.log -ssh-agent bash >> /root/info.log +service ssh start >> /tmp/log/info.log +ssh-agent bash >> /tmp/log/info.log -cat /root/info.log +cat /tmp/log/info.log set -eu