How to deploy build to remote docker host?

Hi there,

 

I am evaluating Teamcity at the moment, and although I am new to CI and docker, I have managed to get quite far. I am just battling to get my head around the last step of the process.

overview:

I am creating .net core dockerised micro-services that are being deployed to multiple containers with their own virtual networks.

I have my pipeline setup like this:

Docker and Teamcity server running on Linux box.

local docker and build agent and vs2107 running on windows 10.

Project code on github

Build steps are in a docker-compose file in the repository.

 

The server is detecting new github pushes and is successfully building and creating the docker containers, but they are being deployed to docker on the windows 10 box.

I want to auto deploy the containers and associated networks to the linux box rather.

Where would I go about setting this up? I do not want to build the actual app on, or pull the source code to the linux box if I can avoid that.

It would also be nice to automatically deploy to a staging or prod server depending on some config setting if possible, but I can live without this if necessary.

 

Any advice pointing me in the right direction would be appreciated.

 

BTW, my docker-compose is:

version: "3.2"

networks:
frontend:
backend:

services:
catalog:
build:
context: .\src\Services\ProductCatalogAPI
dockerfile: Dockerfile
image: shoes/catalog
environment:
- DatabaseServer=mssqlserver
- DatabaseName=CatalogDb
- DatabaseUser=sa
- DatabasePassword=********
container_name: catalogapi
ports:
- "5001:80"
networks:
- backend
- frontend
depends_on:
- mssqlserver

mssqlserver:
image: "microsoft/mssql-server-linux:latest"
ports:
- "1445:1433"

container_name: mssqlcontainer
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=*********
networks:
- backend

.

 Many thanks in advance

 

Dave

0

Please sign in to leave a comment.