#!/bin/bash

if [ ! -d /home/git/.ssh ]; then
  mkdir /home/git/.ssh
  chown -R git /home/git/.ssh
fi

if [ -f /var/run/docker.sock ]; then
  chown root:docker /var/run/docker.sock
fi

exec $@

#!/bin/bash

if [ ! -d /home/git/.ssh ]; then
  mkdir /home/git/.ssh
  chown -R git /home/git/.ssh
fi

if [ -f /var/run/docker.sock ]; then
  chmod o+rw /var/run/docker.sock
fi

exec $@

Add read/write permission to /var/run/docker.sock
Add read/write permission to /var/run/docker.sock
