fix for missing permissions of id_rsa, envs are available even in ssh sessions

This commit is contained in:
Krzysztof Szumny 2015-08-22 17:13:22 +02:00
parent 79499dbd3b
commit 275ed60a50
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
/app/compose/django/entrypoint.sh :
/app/compose/django/entrypoint.sh 'env > /tmp/environment'
USER=docker_{{ cookiecutter.repo_name }}
@ -14,6 +14,8 @@ cat /app/compose/debug/keys_to_docker/id_rsa.pub > /home/$USER/.ssh/authorized_k
chmod 755 /home/$USER
chmod 700 /home/$USER/.ssh
chmod 600 /home/$USER/.ssh/authorized_keys
cp /tmp/environment /home/$USER/.ssh/environment
chown -R $USER:$USER /home/$USER
echo "$USER:docker" | chpasswd

View File

@ -79,3 +79,5 @@ PrintMotd no
KeepAlive yes
PrintLastLog yes
UsePAM yes
PermitUserEnvironment yes