4 ms·
Docker works for you? How? Is it really docker for linux, or docker for windows to which you talk via socket? All I've got trying to run docker was: System
by vetinari 6y ago
Docker works for you? How? Is it really docker for linux, or docker for windows to which you talk via socket?
All I've got trying to run docker was:
System has not been booted with systemd as init system (PID 1). Can't operate.
And it is right, WSL2 uses it's own init system that basically launches bash.
- raesene9 6y agoIME Docker for Windows works pretty well with WSL2. it just mounts the socket file into the WSL2 instance from the Docker instance, for most purposes it's pretty seemless. There are some oddness with things like `--net=host` as the daemon is running in effectively another VM, but for standard Docker workflows it's been fine.
- markawesome 6y agoStartup time for Docker is about 15 seconds, compared to Linux which is immediate. You're also going to get additional slowness because Docker is running inside another VM.
- raesene9 6y agoIf you're talking about time to launch a container, that's nothing like the times I'm seeing, is there perhaps a problem with your setup? time docker run -d nginx 0c65064fc675427f0d49b837f368b6d17c3b42b2aa21bf80222baeb7ed20ed2b real 0m1.556s user 0m0.018s sys 0m0.068s
- markawesome 6y agoI was referring to the actual Docker service startup time for Windows. Once it is started, of course it is going to be much faster. I'm getting half that on Linux on an computer from 2012.
- sz4kerto 6y agoDocker for Linux. The proper one. Do not use systemctl, just: sudo service docker start .. voila
- tbronchain 6y agoThat's how I do it. Same goes for most services. A difference between WSL and standard Linux is that is doesn't have a startup service manager, so you need to start services manually.
- thawkins 6y agoDoes it have an rc.local equiv that you can script those service starts into. Something like the docker entry-point would also work.
- vetinari 6y agoThanks, this works.
- 3np 6y agoWould podman be a better match for with WSL2 perhaps?