Skip to content

Instantly share code, notes, and snippets.

@tanmally
Last active August 29, 2015 13:57
Show Gist options
  • Save tanmally/9806773 to your computer and use it in GitHub Desktop.
Save tanmally/9806773 to your computer and use it in GitHub Desktop.
Install Order 3. Enable rest api access via http for docker on port 4243
# To get Docker to listen on a port 4243 on localhost , if on public ip then secure it before exposing.
sudo service docker stop
sudo touch /etc/init/docker.conf.new
sudo chmod 666 /etc/init/docker.conf.new
sudo sed 's/"$DOCKER" -d $DOCKER_OPTS/"$DOCKER" $DOCKER_OPTS -dns 8.8.8.8 -H tcp:\/\/0.0.0.0:4243 -H unix:\/\/\/var\/run\/docker.sock -d/g' /etc/init/docker.conf > /etc/init/docker.conf.new
sudo mv /etc/init/docker.conf.new /etc/init/docker.conf
sudo chmod 644 /etc/init/docker.conf
sudo service docker start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment