This page outlines the requirements for building with the Azure Linux toolkit on Ubuntu.
The Azure Linux toolkit on Ubuntu has been validated with the following:
- Ubuntu 22.04: Validated with
golang-1.23.1(available asgolang-1.23-gopackage)
The make targets automatically install the appropriate packages:
# For interactive development environments (local machines)
# Installs prerequisites but doesn't modify system configuration
sudo make -C toolkit install-prereqs
# Manually create Go symlinks for proper PATH integration
sudo ln -sf /usr/lib/go-1.23/bin/go /usr/bin/go
sudo ln -sf /usr/lib/go-1.23/bin/gofmt /usr/bin/gofmt
# Manually configure Docker if needed
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
# Note: You will need to log out and log back in for user changes to take effect
# the above 2 steps can alternatively be done using the following command if preferred:
# sudo ./toolkit/docs/building/prerequisites-ubuntu.sh --no-install-prereqs --fix-go-links --configure-docker
----------------------
# For automated environments (CI/CD pipelines) or complete setup
# Installs prerequisites AND configures Docker and Go links
sudo make -C toolkit install-prereqs-and-configureRecommendation:
- Use
install-prereqson your local development machine - Use
install-prereqs-and-configurein CI/CD pipelines or when you need a complete environment setup
If you prefer running the script directly, you have several options:
# Basic installation with Go
sudo ./toolkit/docs/building/prerequisites-ubuntu.sh
# Manually create Go symlinks for proper PATH integration
sudo ln -sf /usr/lib/go-1.23/bin/go /usr/bin/go
sudo ln -sf /usr/lib/go-1.23/bin/gofmt /usr/bin/gofmt
# Manually configure Docker if needed
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
# Note: You will need to log out and log back in for user changes to take effect
# the above 2 steps can alternatively be done using the following command if preferred:
# sudo ./toolkit/docs/building/prerequisites-ubuntu.sh --no-install-prereqs --fix-go-links --configure-dockerThe prerequisites-ubuntu.sh script supports the following options:
--fix-go-links: Creates symbolic links for Go binaries to make them available in your PATH--configure-docker: Installs Docker and adds your user to the docker group--no-install-prereqs: Skips installation of prerequisite packages--help: Displays usage information
Note: If you use
--configure-docker, you will need to log out and log back in for the user changes to take effect.