LoginSignup
1
1

More than 1 year has passed since last update.

初めに

Docker Desktopが有償になったので、代替えとして、「Container Desktop」を試してみました。

導入

前提条件:dockerエンジンの起動に、WSL2を使用しているため、WSL2が導入可能な環境である必要があります。

  1. GitHubから最新版をダウンロードします。

  2. ダウンロードした「ContainerDesktopInstaller.exe」を実行します。

  3. インストール画面が表示されるので、「Install」をクリックします。
    image.png

  4. インストールが開始されます。
    image.png

  5. インストールが終わると、再起動の確認画面が出るので、「はい」をクリックし、再起動します。
    image.png

  6. 再起動後、ログインするとタスクトレイ上に、「Docker Desktop」のアイコンが表示されます。
    image.png
    ※アイコンを右クリックすると、メニューが表示され、Dockerエンジンの停止・起動等が行えます。
    image.png

dockerコマンドの実行

導入が終わると、コマンドプロンプトからdockerコマンドを実行することができます。
試しに、nginxのコンテナを実行してみました。

c:\>docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
3f4ca61aafcd: Pull complete
50c68654b16f: Pull complete
3ed295c083ec: Pull complete
40b838968eea: Pull complete
88d3ab68332d: Pull complete
5f63362a3fa3: Pull complete
Digest: sha256:0047b729188a15da49380d9506d65959cce6d40291ccfb4e039f5dc7efd33286
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest

c:\>docker images
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
nginx        latest    1403e55ab369   2 weeks ago   142MB

c:\>docker run -d --name nginx -p 8080:80 nginx
69918a7dd397222668453b9706f439542b18d43e3c7c70152bf6d93e1153e42c

c:\>docker ps -a
CONTAINER ID   IMAGE     COMMAND                  CREATED          STATUS         PORTS                                   NAMES
69918a7dd397   nginx     "/docker-entrypoint.…"   11 seconds ago   Up 6 seconds   0.0.0.0:8080->80/tcp, :::8080->80/tcp   nginx

ブラウザを開いて、アクセスすると、nginxのページが表示されます。
image.png

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1