我正在尝试按照WSL中有关数字海洋的本文中的讨论进行Redis安装过程。安装的Ubuntu版本是Ubuntu 18.04。
Redis安装中的一切都很好,但是当我尝试运行此命令时sudo systemctl start redis,收到了此消息。
System has not been booted with systemd as init system (PID 1). Can't operate.
Run Code Online (Sandbox Code Playgroud)
关于该怎么办的任何想法?
我正在尝试在 Windows 上使用 Ubuntu 调试 WSL 2 中的一些 C# / .NET 5 代码。我在 Windows 10 上安装了 WSL 2,并且想要测试创建 Systemd 服务。不幸的是,默认情况下 Systemd 似乎并未随 WSL 2 一起启用,尽管标准 Ubuntu 安装默认情况下已启用它。有什么方法可以在 WSL 2 中启用 Systemd 吗?
为什么建议运行 WSL2+docker 桌面 windows,而不是直接在 WSL2 发行版上安装 docker?
似乎两者都有效,但我读到要走的路是使用 docker 桌面,我试图理解为什么。
谢谢
我为Win10 Home安装了Docker Desktop。一切都很顺利,我能够启动 minikube。后来我决定停下来,Vmmem.exe因为我想玩游戏。运行以下命令:
wsl --shutdown
Run Code Online (Sandbox Code Playgroud)
现在Vmmem.exe已停止运行,但如何重新启动它?
minikube start给出以下错误
* minikube v1.22.0 on Microsoft Windows 10 Home Single Language 10.0.19041 Build 19041
* Using the docker driver based on existing profile
X Exiting due to PROVIDER_DOCKER_VERSION_EXIT_1: "docker version --format -" exit status 1: error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified. …Run Code Online (Sandbox Code Playgroud) 我们在Windows Server 2016数据中心框中安装了Windows版Docker。
我们使用此框作为docker容器的构建代理。
当我们尝试通过守护程序连接到此框以构建容器时,会收到一条错误消息,指示守护程序未运行(在发布结束时)。
但是,如果我使用我的AD帐户登录到此框,则守护程序将启动,运行,然后我就可以连接并完成我需要做的所有事情。
有没有一种方法可以使守护进程在启动时启动而无需用户登录?仅当用户登录时,该服务才能运行。
错误信息:
error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=[NameRemovedForPrivacy]&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=[keyRemovedForPrivacy]&shmsize=0&t=[serverNameRemovedForPrivacy]&target=&ulimits=null: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
我尝试过的
executable并com.service.docker在启动时使用优先权限。我在 WSL设置文件中添加了这些行
C:\Users\reynadan\.wslconfig:
[boot]
command=bash /home/reynadan/scripts/startup.sh
Run Code Online (Sandbox Code Playgroud)
/etc/wsl.conf:
[boot]
command=bash /home/reynadan/scripts/startup.sh
Run Code Online (Sandbox Code Playgroud)
/home/reynadan/scripts/startup.sh
[boot]
command=bash /home/reynadan/scripts/startup.sh
Run Code Online (Sandbox Code Playgroud)
我关闭并wsl --shutdown等待了超过 8 秒才再次运行它,但/home/reynadan/wslBootHistory.txt仍然是空的并且 docker 没有运行。
如何确保 WSL 在启动时运行我的脚本?
windows-subsystem-for-linux ×5
docker ×3
.net-5 ×1
bash ×1
c# ×1
minikube ×1
redis ×1
ubuntu-18.04 ×1
wsl-2 ×1