Use docker without sudo

This commit is contained in:
phahulin 2017-07-11 14:08:00 +03:00 committed by GitHub
parent 7479f8e5ee
commit 7c2b60cf49
1 changed files with 4 additions and 4 deletions

View File

@ -117,7 +117,7 @@ install_docker_ce() {
pull_image_and_configs() {
echo "=====> pull_image_and_configs"
sudo docker pull ${INSTALL_DOCKER_IMAGE}
docker pull ${INSTALL_DOCKER_IMAGE}
# curl -s -O "${INSTALL_CONFIG_REPO}/../${GENESIS_JSON}"
curl -s -o "${GENESIS_JSON}" "${GENESIS_REPO_LOC}"
@ -189,7 +189,7 @@ EOF
start_docker() {
echo "=====> start_docker"
cat > docker.start <<EOF
sudo docker run -d \\
docker run -d \\
--name oracles-poa \\
-p 30300:30300 \\
-p 30300:30300/udp \\
@ -245,14 +245,14 @@ EOF"
setup_autoupdate() {
echo "=====> setup_autoupdate"
sudo docker pull oraclesorg/docker-run
docker pull oraclesorg/docker-run
sudo bash -c "cat > /etc/cron.daily/docker-autoupdate << EOF
#!/bin/sh
outlog='/home/${ADMIN_USERNAME}/logs/docker-autoupdate.out'
errlog='/home/${ADMIN_USERNAME}/logs/docker-autoupdate.err'
echo \"Starting: \\\$(date)\" >> \"\\\${outlog}\"
echo \"Starting: \\\$(date)\" >> \"\\\${errlog}\"
sudo docker run --rm -v /var/run/docker.sock:/tmp/docker.sock oraclesorg/docker-run update >> \"\\\${outlog}\" 2>> \"\\\${errlog}\"
docker run --rm -v /var/run/docker.sock:/tmp/docker.sock oraclesorg/docker-run update >> \"\\\${outlog}\" 2>> \"\\\${errlog}\"
echo \"\" >> \"\\\${outlog}\"
echo \"\" >> \"\\\${errlog}\"
EOF"