项目作者: nickvdyck

项目描述 :
🐳-⌚ A command line utiltiy to notify docker mounted volumes about changes on Windows
高级语言: C#
项目地址: git://github.com/nickvdyck/docker-watch.git
创建时间: 2018-07-21T22:30:14Z
项目社区:https://github.com/nickvdyck/docker-watch

开源协议:MIT License

下载


Docker Watch

Build Status
NuGet

The idea of this tool is to provide a workaround for file change events in docker for windows not being fired inside mounted container volumes.
This is caused due to limitations of the current CIFS implementation in the Linux kernel. Which breaks watch modes that many frameworks, tools use to
do recompilation of an application during development (e.g. dotnet-watch, nodemon, webpack, …). A common solution to this problem is to turn on polling
to make those tools pickup file changes. But that requires you to change your dockerfile’s, development scripts, … just to be able to develop on Windows
This is where this tools comes in to help you keep you scripts clean and use the same development process on Windows as you would on Mac or Linux.

Installation

Download the 2.1.300 .NET Core SDK or newer.
Once installed, running the folling command:

  1. dotnet tool install --global docker-watch

Or use the following when upgrading from a previous version:

  1. dotnet tool update --global docker-watch

It requires sh, stat and chmod to already be installed inside a container. This
should be the case for most linux containers e.g. (ubuntu, debian, alpine, …).

Usage

Running docker-watch will setup monitoring for each mount in the current running containers.
It also sets up listeners for container start and stop events so that monitors will be kept in sync.

  1. docker-watch
  1. Notify docker containers about changes in mounted volumes.
  2. Usage: docker-watch [options]
  3. Options:
  4. --version Show version information
  5. -?|-h|--help Show help information
  6. -v|--verbose Enable more verbose and rich logging.
  7. -c|--container <CONTAINER> Glob pattern to filter containers. Without providing a pattern, notifiers will get attached to each running container.