Small software house house/freelancer life isn't easy. Reading HN post about fancy new tech is amusing but as much as it is nice to read as much it's often not reachable for team counting one person.
So whenever I read something new I ask myself this simple question.
Is that new thingy/tech single dev scalable ?
Let's consider a docker application deployment problem. It's hard to do it both: quick and good enough (production ready).
Later, when the app matures/goes bigger you can create a proper CI but at this very beginning you need something simple. Here is how I do deal with it.
First deploy a local registry server push your app image there, next create ssh tunnel and do remote port forward. Finally fetch image from registry and run the app.
Let's try it out line by line. I do assume you have a docker build image named my-image-app (either created with docker build or docker compose) and want to deploy it to customer's customer-server.address.net on port 8888 over ssh.
First create a new local docker registry server. As docker docs claims it's as simple as:
docker run -d -p 5000:5000 --restart=always --name registry registry:2
To do that you need to tag my-image-app with a correct name including registry address ( ie. localhost:5000).
docker tag
my-image-app localhost:5000/my-image-app
docker push localhost:5000/my-image-app
ssh -R 5001:localhost:5000 customer-server.address.net -p 8888
remote-prompt: docker run -d --name my-app localhost:5001/my-image-app
host customer-server HostName customer-server.address.net Port 8888 User user RemoteForward 5001 localhost:5000
ssh customer-server
UPDATE: one crucial command connect via ssh was missing when published this first time