Refactored dockerfile and init.sh