2

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?

3
  • Could you add some logging of bitbucket-pipelines that contains the errors?
    – 030
    Dec 20 '19 at 10:48
  • @030 It's not really a problem of getting errors, it's that i don't know how to do this. The info in ~/.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
  • You should get some error logging in the log of bitbucket-pipeline? I assume that you tried something in the pipeline?
    – 030
    Dec 20 '19 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.