WLinux as Main Dev Env
by mmyoji
2 min read
I've upgrade my Windows PC to Windows 10 Pro at the beginning of month to use Docker in it and started to use WSL (WLinux) as main development environment in both private and work this week.
Here I'll write some kind of caveats for setup.
Docker
You just install
Docker for Windows and docker CLI
through wlinux-setup
command inside WLinux.
docker volumes
You might want to use docker volume in some apps, and follow the instruction:
- Open Docker for Windows
Settings
dialog - Go to
Shared Drives
- Check the drive(s) which you want to mount like
C
,D
, or etc. - Then restart the Docker for Windows (or restart your machine itself)
You cannot use the volume under WLinux /home/<username>
directories and have
to go under /c/Users/<username>
directory, it works.
This is because WLinux is virtual machine and Docker cannot mount volume under it. (I DON'T UNDERSTAND THIS WELL)
So I create /c/Users/mmyoji/Dev
directory and write code under it basically.
This workaround sucks a bit and I need better solution for it.
docker compose
I always fail to run docker-copmpose up
whenever I restart my Windows PC, and
Docker for Windows requires to be restared. (although this might happen only on
my machine).
I'm not sure to solve this problem and find the solution on the web, everybody just says "restart your docker for win" and I gave up.
Fonts
The default WLinux terminal fonts are not great except Consolas. But Consolas cannot show Japanese. I don't have any problems in private, but have to handle Japanese in my current job.
I tried and found a good font: Osaka. There are several posts to install font to Windows and I omit the explanation.
Other Problems
I use ghq to move around the directories but
it often fails silently. I also started using z.
I've only used ghq look
command and can replace ghq look
with z
though
this is not completely the same thing.
paste doesn't work with Shift+Ctrl+v
, but right click mouse button in WLinux
default terminal. Alacritty is a better
terminal, but it cannot recognize Osaka font and can't show Japanese.
Summary
There are some extra workaround and I'm not completely satisfied with WSL. Nevertheless I've work with it well like Linux env.
I'm gonna use WLinux still and I hope some issues will be solved soon.