Docker : How to run grunt-open?

I have been using a grunt-open package for open my browser when i build my project. Recently I begin to use docker and this works perfectly, But the grunt-open task don’t works anymore.

Exist some way to create a bridge between my docker and my local machine for opens my browser using grunt-open?

  • Docker compose “--no-build was passed”
  • django cms filer uploads fail
  • docker compose with build --pull option
  • Elastic beanstalk : load balancer DNS unreachable
  • Restart flask app in docker on changes
  • CircleCI - Git could not resolve host when cloning repository
  • How can I use a docker swarm mode manager behind a floating IP
  • Cron in the same container works locally but fails in cluster
  • Docker - Install CI Server on a remote host
  • Port forwarding Ubuntu - Docker
  • How to make Docker application public accessible
  • How can I terminate a Docker instance from within itself?
  • 2 Solutions collect form web for “Docker : How to run grunt-open?”

    There is no way to open an external browser if you are running or building your project inside a docker container. The idea of using docker is to have all the tools you need inside the container.

    You can use an gui less browser like PhantomJS and run grunt-open task inside the docker container.

    There is no “automatic” way – you would need to have some kind of listener on your local machine. So you can’t really use grunt-open from the container but there are any number of ways you could have the grunt task in the container send a call to your local machine which could use grunt-open (or npm-open which it’s a wrapper for, or opn which npm-open is a wrapper for) — or a simple shell script.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.