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 Load Balancing Multiple Hosts Sessions Shared Memory
  • How to use MariaDB in Docker?
  • What are the differences between Kubernetes Pods and Docker Compose(s) (Composures?)
  • Docker not releasing ports
  • Docker, how to expose a socket over a port for a Django Application
  • How to change postgresql.conf from Postgres docker image
  • Docker - Backup Containers in /var/lib/docker/vfs/dir
  • Running services (upstart/init.d) in a container
  • Docker: cannot access the folder structure of based image
  • Is it possible to create ipv4-enabled Docker Machine on Windows 10?
  • Understanding overlay networks in docker
  • Restricting users in Docker group to not run privileged containers
  • 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.