Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save praba230890/087c0311680fdc31fae56c3f0e5b6d34 to your computer and use it in GitHub Desktop.
Save praba230890/087c0311680fdc31fae56c3f0e5b6d34 to your computer and use it in GitHub Desktop.
Using Astronomer in WSL Ubuntu using Podman

Go to the Ubuntu latest version in WSL:

sudo apt-get -y update
sudo apt-get -y install podman
curl -sSL install.astronomer.io | sudo bash -s
cd /home/
ls
mkdir astronomer
cd astronomer/
podman machine init
podman run -dt -p 8080:80/tcp docker.io/library/httpd
podman ps
podman system connection ls
cat << EOF | sudo tee -a /etc/containers/registries.conf.d/shortnames.conf
"postgres" = "docker.io/postgres"
EOF
podman run --rm -it postgres:12.6 whoami
astro config set -g container.binary podman
mkdir astro
cd astro/
astro config set -g duplicate_volumes false
astro dev init
sudo apt install -y podman-docker
sudo curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose version

Enable Sysemctl in wsl.conf:

sudo nano /etc/wsl.conf
[boot]
systemd=true

type the above content at the end of the file, then save and exit the ubuntu. Then run the following commands:

wsl.exe --shutdown in powershell

Then open the ubuntu again and run the following commands:

sudo systemctl enable --now podman.socket
cd /home/astro/
sudo systemctl status podman.socket
sudo curl -w "\n" -H "Content-Type: application/json" --unix-socket /var/run/docker.sock http://localhost/_ping
sudo apt install python3-pip
sudo -H pip3 install --upgrade pip
sudo pip3 install podman-compose
podman-compose version
astro dev start
cat /etc/resolv.conf

get the IP for use from windows or try to use localhost

References

https://podman.io/getting-started/installation https://docs.astronomer.io/astro/cli/install-cli https://docs.astronomer.io/astro/cli/configure-cli https://docs.oracle.com/en/learn/podman-compose/index.html#setup-podman-to-work-with-compose-files https://www.educative.io/answers/installing-pip3-in-ubuntu https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment