Self hosted agent for Azure DevOps
254
docker run -e AZP_URL="https://dev.azure.com/__xyz__" -e AZP_TOKEN="" -e AZP_POOL="Aug26" -e AZP_AGENT_NAME="Docker Agent - Linux" --name "azp-agent-linux" azp-agent:linux
sudo apt update
sudo apt install docker.io -y
docker run hello-world
If the output says:
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
You use the below command to verify if the docker daemon is actually started and Active
sudo systemctl status docker
If you notice that the docker daemon is not running, you can start the daemon using the below command
sudo systemctl start docker
To grant access to your user to run the docker command, you should add the user to the Docker Linux group. Docker group is create by default when docker is installed.
sudo usermod -aG docker username
In the above command ubuntu is the name of the user, you can change the username appropriately.
NOTE: : You need to logout and login back for the changes to be reflected.
Use the same command again, to verify that docker is up and running.
docker run hello-world
Ref : MS DOCS
Content type
Image
Digest
sha256:5ecea27f0…
Size
220.9 MB
Last updated
about 1 year ago
docker pull oj09/ado-ubuntu-agent:2404