Deploy a docker container to production
Are you deploying a rails app? I would take a look at Dokku which is basically a self hosted version of heroku.
If you want to use docker directly I would take a look at using a deployment script of some type to help you with this. Basically it can login via ssh, git clone the code to a directory and then run the docker image with the new directory (stopping any existing instances). But again Dokku makes this way simpler.