表題の件、まだよくわかっていないところも多いのだが、こういうのもあるのか、と知ったのでメモ。
■ 環境
- Docker for Mac
- Mac OSX El Capitan
■ pinata
先日のエントリにて、Docker for Macでインストールされるコマンドは下記のようであることがわかった。
- docker
- docker-compose
- docker-diagnose
- docker-machine
- notary
- pinata
この中から`pinata`で実行可能な内容について。
■ commands
`pinata`のコマンドは下記があるようだ。
- diagnose
- doctor
- get
- list
- reset
- restart
- set
各種設定項目の設定・取得・初期化・一覧といったような内容であろう。`diagnose`はエラー情報等を外部に送る為のコマンドのようである。
■ list
`list`を試してみる。
$ pinata list
These are advanced configuration settings to customise Docker.app on MacOSX.
You can set them via pinata set .
? hostname = docker
Hostname of the virtual machine endpoint, where container ports will be
exposed if using nat networking. Access it via 'docker.local'.
? hypervisor = native (memory=4, ncpu=2)
The Docker.app includes embedded hypervisors that run the virtual machines
that power the containers. This setting allows you to control which the
default one used for Linux is.
▸ native: a version of the xhyve hypervisor that uses the MacOSX
Hypervisor.framework to run container VMs. Parameters:
memory (VM memory in gigabytes), ncpu (vCPUs)
? network = hostnet (docker-ipv4=192.168.65.2, host-ipv4=192.168.65.1)
Controls how local containers can access the external network via the
MacOS X host. This includes outbound traffic as well as publishing ports
for external access to the local containers.
▸ hostnet: a mode that helps if you are using a VPN that restricts
connectivity. Activating this mode will proxy container network
packets via the Docker.app process as host socket traffic.
Parameters: docker-ipv4 (docker node), host-ipv4 (host node)
▸ nat: a mode that uses the MacOS X vmnet.framework to route container
traffic to the host network via a NAT.
? filesystem = osxfs
Controls the mode by which files from the MacOS X host and the container
filesystem are shared with each other.
▸ osxfs: a FUSE-based filesystem that bidirectionally forwards OSX
filesystem events into the container.
? native/port-forwarding = true
Expose container ports on the Mac, rather than the VM
▸ true: Container ports will be exposed on the Mac
▸ false: Container ports will be exposed on the VM
? daemon = run 'pinata get daemon' or 'pinata set daemon [@file|-]>
JSON configuration of the local Docker daemon. Configure any custom
options you need as documented in:
https://docs.docker.com/engine/reference/commandline/daemon/. Set it
directly, or a @file or - for stdin.
$
`set`を使ってこれらの値を変更することができるようだ。各値は`get`で取れるであろう。
■ doctor
Homebrewでもある`doctor`コマンドを試してみる。
$ pinata doctor
This tool will help identify any incompatibilities between your environment
and Docker for Mac. If Docker for Mac is working fine: please don't worry and
just ignore these warnings!
Warning: You have installed docker on your system with homebrew.
This can interfere with the operation of Docker 4 Mac. If you would like to
remove it:
brew uninstall docker
The doctor found 1 problem.
Homebrewでインストールしている`docker`を削除して問題ないとのメッセージだ。これも先日のエントリの通り、認識しているが、もうしばらく削除するつもりはない。
以上。