1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Help]Docker for windows 2.3.0.4でログインなしサービス起動方法がうまくいかない件[助けて]

Posted at

ログイン問題について

Docker for windowsで設定する自動起動オプションは
立ち上げ後、1度ログインしないとdockerサービスが起動しない設定である。
検証、開発用のWindows10Pro機は最近、更新で再起動することが多発している。
電源ONしたらそのうちdockerサービスの立ち上がっている状態を作りたい。

環境

Docker

image.png

Windows

エディション:Windows10 Pro
バージョン:1909
OSビルド:18363.1082

予備知識

方法自体はフォーラム内で議論があった1分遅延タスクスケジューラになります。
https://forums.docker.com/t/run-docker-as-a-service/28124
ローカルユーザ作って1分後に実行するようにするというのが結論。

方法

1. タスクスケジューラを起動する

image.png

2. タスクスケジューラからタスクの作成を選択する

image.png

3. タスクの作成

3.1 全般タブ

image.png

3.2 トリガータブ

image.png

image.png

3.3 操作タブ

image.png

image.png

Dockerを動かすことができるユーザ情報を入力
image.png

4. Windowsを再起動する。

Windowsの起動(セキュリティアップデート含む) + 1分遅延 + Dockerの起動
はインスタントうどんがふやけるくらい待たなくてはならないときもある。

現状の結果

コンテナは稼働しているようだが、Docker for windowsのダッシュボードが動かなくなる。
image.png

以下に変更しても同様。
プログラム/スクリプト(P):
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
引数の追加(オプション)(A):
-File C:\start.ps1

start.ps1
start "C:\Program Files\Docker\Docker\Docker Desktop.exe"
start-service -Name com.docker.service

タスクスケジューラ―の設定したユーザがdocker-userに所属していることも確認。
現在詰んでいる。

1
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?