Deploy to remote docker host


Hello there.
I’m a newbie at CircleCI so sorry if it was already discussed.
I have a DO Droplet. And I would like to deploy my software there through CircleCI in docker container.
I have docker-compose file and as I understand setup_remote_docker makes remote connect.
But where I need to set up envs like:
I cant find any docs/threads about it.
Please give me an advice. Thanks


I don’t think you want that command. There are plenty of ways to do Continuous Deployment (CD), involving things like Swarm or Kubernetes. However, I don’t (yet) have experience of them. What I would presently do instead is to ssh into the remote server and execute a script to do the deployment.

It might be something like this:

  • Run your tests
  • Build a Docker image
  • Push image to remote registry
  • Use SSH to pull new image on remote
  • Use SSH to restart container on remote

Of course, you have to handle migrations and mitigate against a few second of outage during reboot, build rollback workflows, etc.

This is why there is a lot of tooling around CD - it is not something one can teach in a single post on the web.


SSH is not what I’m looking for but thanks for reply!
So I will continue to search how to connect through docker socket.


This might help, but are you sure that Digital Ocean exposes the Docker port to the outside world?


yeap, its my droplet. And its open worldwide.


OK. Have you tested it by issuing a trivial docker command to see if it can be remotely controlled? What authentication scheme are you using?

closed #7

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.