Skip to content

Instantly share code, notes, and snippets.

@canabady
Last active July 16, 2019 03:53
Show Gist options
  • Save canabady/ebc94f93d72d6b4604957094ebc5bbd3 to your computer and use it in GitHub Desktop.
Save canabady/ebc94f93d72d6b4604957094ebc5bbd3 to your computer and use it in GitHub Desktop.
To open a url from other application into running docker based chrome
# Docker, Chrome and Ubuntu
# When the chrome container exists and it is running, to open a url in it from other applications
if [ "$CHROME_RUNNING" == "false" ]; then
docker start chrome
else
docker exec chrome sh -c "/usr/bin/google-chrome '$@' --user-data-dir=/data" &> /dev/null
fi
# Source: https://tuttlem.github.io/2015/10/08/docker-chrome-and-ubuntu.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment