Setup OCI Function Development on Windows with WSL2

Install WSL2 - Ubuntu
Open the Microsoft Store.
Search for Ubuntu 24.04
Install
Launch Ubuntu terminal
Search for "Ubuntu" in your apps.
On the initial launch, you'll be prompted to create a username and password. Set these and remember them.
Execute the following commands:
sudo apt update && sudo apt full-upgrade -y
Install podman-docker
sudo apt install podman-docker
sudo touch /etc/containers/nodocker
Install Fn CLI
curl -LSs https://raw.githubusercontent.com/fnproject/cli/master/install | sh
Set the Fn settings to use the Podman engine by adding or updating the following line:
vi ~/.fn/config.yaml
Add or update line:
container-enginetype: podman
Install OCI CLI
sudo apt install python3-pip
pip3 install oci-cli --break-system-packages
Create .bash_profile
vi ~/.bash_profile
Set the file contents as follows:
#!/bin/bash
source ~/.bashrc
export PATH=~/.local/bin:$PATH
Setup Config
oci setup config
Complete Fn Setup
Follow steps 4 onwards in the Functions QuickStart on Local Host.
NOTES:
Step 4.3 is optional. Set it if you're using a profile other than the DEFAULT profile in the OCI CLI config.
Step 5.3: you can get the tenancy namespace by executing
oci os ns get
.
Development in VS Code
Install the Remote Development extension in VS Code.
Connect to WSL
Subscribe to my newsletter
Read articles from Joe Ngo directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
