Answers: <p>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 <code>:latest</code> image.  You could use any number of techniques to accomplish this: a CM tool like Ansible or Chef, a Bash script or simply SSH.  </p>
  
  <p>Travis CI documentation has some information on deployment providers: <a href="https://docs.travis-ci.com/user/deployment/" rel="nofollow noreferrer">https://docs.travis-ci.com/user/deployment/</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2019-03-26T14:19:20.440Z
Answers: 2019-03-26T14:19:20.440Z
Answers: swysocki
Body: <p>Note: I am a .NET Developer that is dabbling in DevOps. I want to learn.</p>
  
  <p><strong>Current Situation:</strong></p>
  
  <p>I have my .NET Core project dockerised. It sits <a href="https://github.com/JwanKhalaf/Bejebeje.Identity" rel="nofollow noreferrer">on GitHub</a> 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 <a href="https://cloud.docker.com/u/bejebeje/repository/docker/bejebeje/identity" rel="nofollow noreferrer">to Docker Hub</a> with two tags <code>$BUILD_NUMBER</code> and <code>latest</code>.</p>
  
  <p>I have an Ubuntu VPS where I plan on running my dockerised applications.</p>
  
  <p><strong>Question:</strong></p>
  
  <p>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?</p>
  
  <p>This is where I am stuck.</p>
  
  <p>I understand that once the docker containers are running on my VPS, I have to <a href="https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-2.2" rel="nofollow noreferrer">set up nginx</a> as proxy ...etc, so I'm OK with that. I am just stuck on getting the latest docker image running on my VPS.</p>
  
Tags: <docker><docker-compose><travis-ci>
Title: Docker Hub to VPS
UserDisplayName: J86
ThreadText: # Docker Hub to VPS
  
  (Asked by: username_0 on 2019-03-25)
  
  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](https://github.com/JwanKhalaf/Bejebeje.Identity) 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](https://cloud.docker.com/u/bejebeje/repository/docker/bejebeje/identity) 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](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-2.2) as proxy ...etc, so I'm OK with that. I am just stuck on getting the latest docker image running on my VPS.
  
  **Tags:** docker, docker-compose, travis-ci
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-03-26. Score: 1 | Accepted answer
  
  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/>
  
  
  ---
  
  