スタディスト Tech Blog Advent Calendar 2022の8日目を担当します。管理部 ビジネステクノロジーユニットの okash1n です。

以前Docker Desktop の有料化についてのお話を書きましたが、Macにおける代替手段の紹介があまり出来ていなかった為、先日 11/23 にAWSが突如公開した「Finch」というOSSツールを紹介します。

Docker Desktopの有料化が企業に与える影響と、企業における適切なDockerの利用方法

Finchとは

Introducing Finch: An Open Source Client for Container Development | Amazon Web Services

Finch is a new command line client for building, running, and publishing Linux containers. It provides for simple installation of a native macOS client, along with a curated set of de facto standard open source components including Lima, nerdctl, containerd, and BuildKit. With Finch, you can create and run containers locally, and build and publish Open Container Initiative (OCI) container images.

簡単に言うと、MacOSクライアント上でDockerを動かすためにLimaやnerdctlなどの各種OSSをひとまとめにして簡単に構築出来るようにしたもの、ということです。

類似のサービスでは Rancher Desktop が存在しています。

Rancher Desktopとの差異としては、FinchにはGUIがなかったり、Windowsには現状対応していないといった違いがあります。

使ってみる

リポジトリのREADMEを参考に進めます

https://github.com/runfinch/finch

インストール

Intel CPUのMacBook Proで実施します

brew install --cask finch

==> Downloading <https://github.com/runfinch/finch/releases/download/v0.1.0/Finch>
==> Downloading from <https://objects.githubusercontent.com/github-production-rel>
######################################################################## 100.0%
==> Installing Cask finch
==> Running installer for finch; your password may be necessary.
Package installers may write to any location; options such as `--appdir` are ignored.
Password:
installer: Package name is Finch
installer: Installing at base path /
installer: The install was successful.
🍺  finch was successfully installed!

初回起動

初回のみ、 finch vm init で仮想マシンの起動を行う必要があるようです。

$ finch vm init

INFO[0000] Using default values due to missing config file at "/Users/okash1n/.finch/finch.yaml"
INFO[0000] "/Users/okash1n/.finch" directory doesn't exist, attempting to create it
INFO[0000] binaries directory doesn't exist
INFO[0000] Requesting root access to finish network dependency configuration
INFO[0000] sudoers file not found: %!w(*fs.PathError=&{open /etc/sudoers.d/finch-lima 2})
INFO[0000] Initializing and starting Finch virtual machine...
INFO[0152] Finch virtual machine started successfully

これによってMac上でLima仮想マシンが構築されます

Dockerイメージの起動