Alpine Linux dockerized application development with Windows 10 + WSLv2 + Docker + CLion

This is a quick post to describe how I use CLion on Ubuntu with WSLv2 to develop applications for Alpine Linux in Docker.

First, install WSLv2  using the following instructions: https://docs.microsoft.com/en-us/windows/wsl/install-win10.  

Once you have WSLv2 with Ubuntu setup, you can access Linux from the cmd.exe using the command wsl.

cmd.exe -> wsl -> Inside Linux now!

The only problem here is... well, cmd.exe is a terrible terminal with limited features.  I come from the Linux side of things, and I LOVE using terminator.  Therefore, the first thing I'm going to do is find a way to skip the cmd.exe -> wsl  routine and run terminator for my terminal needs.   Spoiler warning: the general strategy used for running terminator on Windows is more or less the same strategy used to get any Linux UI app running on Windows.

Step 1: Get a Windows xserver

  The most used windows xserver solution I believe is  vcxsrv and they provide tutorials in their wiki to run Linux apps on windows.   However, I decided to use a paid option called X410 , which in my opinion, has better integration with Windows.

Once installed and running, we will need to enable "Allow Public Access".  Depending on your network, some security considerations will need to be taken so please be aware.  You don't want some randos opening X11 applications remotely in your computer or worse!

x410: Allow Public Access

Complementary, the x410 website also provides a nice tutorial  for using it with wsl2, which uses a  similar approch as us.   Check them out at https://x410.dev/cookbook/wsl/using-x410-with-wsl2/

Step 2:  Install Terminator

Now, to install Terminator, do the cmd.exe -> wsl  dance to get into the Linux console and install it. sudo apt update && sudo apt install terminator

Installing Terminator terminal

Once installed, and with X410 up and running.

* THIS IS PART 1, will be extended soon*