0.0.7 • Published 4 years ago

windows-docker-machine v0.0.7

Weekly downloads
10
License
MIT
Repository
github
Last release
4 years ago

windows-docker-machine-cli

A tiny wrapper around windows-docker-machine to run Windows Docker Images on all platforms.

Installation:

For caching reasons the cli works best if it is installed first.

  npm install windows-docker-machine

To use the CLI the following tools must be installed:

Usage:

  npx windows-docker-machine

Preview

Windows Machine Diagram

Running docker images

run supports all docker run options:

npx windows-docker-machine run hello-world
npx windows-docker-machine run -d -p 8000:80 -v C:/$(pwd):C:/inetpub/wwwroot/content mcr.microsoft.com/windows/servercore/iis

Keep docker image up

By default windows-docker-machine will cleanup once the image execution is finished. This behaviour can be disabled with the --noCleanup flag.

npx windows-docker-machine run --noCleanup hello-world

Custom Vagrantfile options

It is possible to provide custom vagrant options.
This will allow for example to forward specific ports.

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
    config.vm.network "forwarded_port", guest: 8000, host: 8000, auto_correct: true
end
npx windows-docker-machine run --vagrantfile=Vagrantfile hello-world

Docker Compose

Right now docker-compose has no support for docker context.
To make use of docker-compose windows-docker-machine-cli adds a workaround which executes docker-compose directly inside the vagrant image:

npx windows-docker-machine docker-compose up

windows-docker-machine

Almost all features have been developed by Stefan Scherer in windows-docker-machine

License

This project is licensed under MIT.

0.0.7

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago