0
votes

I am trying to run a self- hosted agent in docker, I have created the dockerfile and start.ps1 files and installed the Azure DevOps Server Express Admin console. I am getting a "Basic authentication requires a secure connection to the server " when I try running the container in docker ( switched windows containers) URL: http://computername/DefaultCollection

I have also attached a screenshot of the error

can you please advise how to resolve this issue.

Docker Run error

thanks

1

1 Answers

0
votes

Run a self-hosted agent in Docker

I could not reproduce this issue on my side with hosted agent windows-2019.

To test this issue, I created a folder dockeragent in my Azure repo, which including the files Dockerfile and start.ps1

enter image description here

Then copy the content from the document Run a self-hosted agent in Docker to those two files.

Next, create a pipeline with an inline powershell task to create the docker image and run docker container:

cd $(System.DefaultWorkingDirectory)\dockeragent

docker build -t dockeragent:latest .

docker run -e AZP_URL=https://dev.azure.com/<YourOrganizationName> -e AZP_TOKEN=<YourPAT> -e AZP_AGENT_NAME=mydockeragent dockeragent:latest

The test result:

enter image description here

To make it work, please make sure the file Dockerfile and start.ps1 is correct without any change.

If above info not help you, please share the content of your Dockerfile and the steps you did.