Docker【インストール】
WSL2をインストールしたので、Dockerのインストールにトライします。
ページからインストーラをダウンロード・実行。"Enable WSL 2 Windows Features"にチェックを入れるのを忘れない。
$ docker ps The command 'docker' could not be found in this WSL 2 distro. We recommend to activate the WSL integration in Docker Desktop settings.
docker Desktopから、WSL2の選択が必要です。Settings→Resources→WSL INTEGRATIONから設定します。
設定したら、もう一度コマンドを入れます。
$ docker ps
うまく出力されればOK。
PCの再起動後
PCを再立ち上げしたりすると、以下コマンドが出力されたりします。
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
docker desktopから見ると、wsl integrationの設定のチェックが外されたりしていたので、再設定。設定を保存する方法とかは確認中、、、
チュートリアル
$ docker run hello-world
dockerが入っていれば、hello-worldイメージが自動的にダウンロードされて実行することができます。
FrontISTRでdocker
チュートリアル代わりに、OSSのFEMソフトウェアFrontISTRでdockerをやってみます。 www.ricos.co.jp
まずは、frontISTR自体をgit cloneして、docker imageを続いてpullします。
$ git clone https://github.com/FrontISTR/FrontISTR.git $ docker pull registry.gitlab.com/frontistr-commons/frontistr/fistr1:master
実行ディレクトリに移動して、dockerコマンドでFrontISTRを実行します。
$ docker run -it --sig-proxy=false --rm -u $UID -v $PWD:$PWD -w $PWD registry.gitlab.com/frontistr-commons/frontistr/fistr1:master fistr1 -t 1
詳細の理解はおいおいやっていこう