Docker gets error “failed to compute cache key: not found” – runs fine in Visual Studio

Check your .dockerignore file. Possible it ignores needed files for copy command and you get failed to compute cache key error. .dockerignore may be configured to minimize the files sent to docker for performance and security: * !dist/ The first line * disallows all files. The second line !dist/ allows the dist folder This can … Read more

WSL-2: Which ports are automatically forwarded?

When you run WSL-2, a machine like a vitural machin run on your window device. Windows will create a local network, same your LAN, and connect WLS-2 to this network. On your WSL2, you can run ip a | grep eth0, result look like: 5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default … Read more

How to “copy to clipboard” in vim of Bash on Windows? [closed]

Since neither “*y nor “+y (…) work, an alternative is the following: Add this to your .vimrc and create a file called ~/.vimbuffer ” copy (write) highlighted text to .vimbuffer vmap <C-c> y:new ~/.vimbuffer<CR>VGp:x<CR> \| :!cat ~/.vimbuffer \| clip.exe <CR><CR> ” paste from buffer map <C-v> :r ~/.vimbuffer<CR> Higlight any text using visual or visual-block … Read more

VSCode: use WSL Git instead of Git for Windows

Since VS Code 1.34 (April 2019) a remote extension has been introduced to develop into WSL: https://code.visualstudio.com/docs/remote/wsl. Basically, a server instance of VS Code is started into WSL, allowing you to use all the WSL tools (e.g. git) from your client instance on Windows. Thank you for pointing that out @Noornashriq Masnon!

What is the proper way of using JDK on WSL2 on Windows 10?

Run the following commands as a user with sudo privileges or root to update the packages index and install the OpenJDK 11 JDK package: $ sudo apt update $ sudo apt install openjdk-11-jdk Once the installation is complete, you can verify it by checking the Java version: $ java -version The output should look something … Read more

Location of .bashrc for “Bash on Ubuntu on Windows” in Windows 10

Since the Windows 10 Fall Creators Update, the location changed to: C:\Users\USERNAME\AppData\Local\Packages\{DIST}\LocalState\rootfs\home\{LINUXUSER}\ Where: {DIST} is equal to CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc {LINUXUSER} is the user for which you are looking for the .bashrc file Just for anyone wondering that came here from Google.

Is there any method to run perf under WSL?

WARNING: perf not found for kernel 4.19.84-microsoft Because WSL2 uses custom Linux kernel. Its source code can be found here microsoft/WSL2-Linux-Kernel. We have to compile perf tools from it. Procedure Install required build packages. If you are using Ubuntu in WSL2 this is the required command: sudo apt install build-essential flex bison libssl-dev libelf-dev Clone … Read more