I'm trying to expand my use of docker for my local environment (and learn more about docker in the process). But I have a question about getting notifications from gulp-notify back to my desktop. They show up in my terminal logs just fine.
My docker-compose file contains a local
section like this.
local:
image: uconn/local:latest
ports:
- "3000:3000"
volumes:
- ./:/project
- /project/node_modules
tty: true
Typically in my gulpfile I use a task like this
gulp.task('sass', function() {
return gulp.src('./style.scss')
.pipe(plugins.plumber({
errorHandler: plugins.notify.onError("Error <%= error.message %>")
}))
.pipe(plugins.sass())
.pipe(gulp.dest('./', {
overwrite: true
}));
});
The task itself works (it turns sass into css) but on error's the notifier reports gulp-notify: [Error running notifier] Could not send message: not found: notify-send
.
Since I'm running the gulp task inside docker, I suppose it's obvious that this won't work the way it is. So, how can I pass the notification messages out of docker?
EDIT/UPDATE I just found this info in the docker docs. However I don't have enough experience to understand what it means.
I WANT TO CONNECT FROM A CONTAINER TO A SERVICE ON THE HOST
The Mac has a changing IP address (or none if you have no network access).
From 17.06 onwards our recommendation is to connect to the special Mac-only
DNS name docker.for.mac.localhost which will resolve to the internal IP
address used by the host.