Last active
July 16, 2019 03:53
-
-
Save canabady/ebc94f93d72d6b4604957094ebc5bbd3 to your computer and use it in GitHub Desktop.
To open a url from other application into running docker based chrome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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