In the previous post that I demonstrated how to create a Self-hosted Build Agent on Windows. As I implemented Docker integration to the CI/CD DevOp pipeline on TFS, I need to make sure my build agent can build and push Docker image to Registry. The simple option is to installing Docker to our VM Windows Server, however, there are lots of issues to run Docker Windows on top of VM. I decided to create Linux VM for build agent and install Docker into it.

Following the same instructions to create build agent on Windows. The only issue is to run the config.sh on Linux, it throws an System.Net.Http.CurlHandler due to missing OpenSSL. The following approach can work for both Linux or MacOS.

brew update
brew install openssl
mkdir -p /usr/local/lib
sudo ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
sudo ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/

then install the agent again

~/myagent$ ./config.sh

To run Agent as a Service:

sudo su
./svc.sh install
./svc.sh run

Then you just need to install Docker on Linux by using following commands.

sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update

apt-cache search docker-ce

sudo apt-get install docker-ce

Test if Docker is running with the following command

docker run hello-world

Permission issue when running docker with the build agent

Assign $USER to docker group
sudo usermod -a -G docker $USER
systemctl start docker
gpasswd -a $USER docker
reboot

** To build .NET Core application with Linux build, you need to install Java (for getting the source code) and .NET Core Sdk
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install dotnet-sdk-2.1

Install Java

sudo add-apt-repository ppa:webupd8team/java
sudo apt update; sudo apt install oracle-java8-installer

Book online now &
SAVE
10%
On Your Ride

DOWNLOAD OUR APP
avada-taxi-phone-app

About the Author

Buy Avada Now

Subscribe Today

Subscribe to our monthly newsletter to receive all of the latest news and articles directly to your inbox.

Discussion

Leave A Comment

Testimonials

“Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.”

avada-taxi-testimonial-1

Mike Smith – Brooklyn, NY

Related Posts

If you enjoyed reading this, then please explore our other articles below:

Back to News

Don’t want to use the app?

No problem, book online or give us a call!

BOOK ONLINE
CALL TO BOOK
BOOK ONLINE
CALL TO BOOK