如何将吞吐量通知从Docker中传出?

我正在尝试扩展我的本地环境的docker的使用(并在此过程中了解更多关于docker的信息)。 但是我有一个关于从gulp-notify通知回到我的桌面的问题。 他们出现在我的terminal日志蛮好的。

我的docker组成文件包含这样的local部分。

 local: image: uconn/local:latest ports: - "3000:3000" volumes: - ./:/project - /project/node_modules tty: true 

通常在我的gulpfile中,我使用这样的任务

 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 })); }); 

任务本身的作品(它变成了CSS),但错误的通知报告gulp-notify: [Error running notifier] Could not send message: not found: notify-send

因为我正在docker中运行吞吐任务,所以我认为很明显这是不行的。 那么,如何将通知消息从Docker中传递出去呢?

编辑/更新我刚刚在docker文档中find这个信息。 但是我没有足够的经验去理解它的含义。

 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. 

Interesting Posts