I have some servers where I have nginx installed on the base system in reverse proxy mode, and then use Docker deployments to push out containers where just the local HTTP port is exposed.
We don't have a full CI/CD system in place, and have been getting along fine with Bitbucket Pipelines for many things (usually just doing rsync of build artifacts).
In my Docker based projects, my release script that I run locally ends with something along the lines of
eval $(docker-machine env ${MACHINE_NAME})
docker stop ${IMAGE_NAME}-app-1
docker pull ${REGISTRY_HOST}/${IMAGE_NAME}:${IMAGE_TAG}
docker run -d -p 8080:8080 --rm --name ${IMAGE_NAME}-app-1 ${REGISTRY_HOST}/${IMAGE_NAME}:${IMAGE_TAG}
This works great, but I would like to run this from a pipeline as a deployment step. Given that certificates and keys are stored in ~/.docker/machine/, is this even possible, or do I need to do a server side script that I trigger with ssh from the pipeline?
~/.docker/machine/is private, so it shouldn't be part of the repo to be available to the pipeline/ – mpdonadio Dec 20 '19 at 13:42