1

Note: I am a .NET Developer that is dabbling in DevOps. I want to learn.

Current Situation:

I have my .NET Core project dockerised. It sits on GitHub and is Open Source. Using Travis CI; as soon as I check some code into the GitHub repository, Travis CI builds a fresh docker image and pushes it to Docker Hub with two tags $BUILD_NUMBER and latest.

I have an Ubuntu VPS where I plan on running my dockerised applications.

Question:

Once the images are uploaded to Docker Hub (i.e. travis has finished the steps inside .travis.yml), how can I get those latest images to automatically run on my VPS?

This is where I am stuck.

I understand that once the docker containers are running on my VPS, I have to set up nginx as proxy ...etc, so I'm OK with that. I am just stuck on getting the latest docker image running on my VPS.

1 Answer 1

1

One typical solution is to add a deployment task to your Travis CI pipeline. This task may, for example, run a command on your Ubuntu VPS to pull and run the :latest image. You could use any number of techniques to accomplish this: a CM tool like Ansible or Chef, a Bash script or simply SSH.

Travis CI documentation has some information on deployment providers: https://docs.travis-ci.com/user/deployment/

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.