built with concourse

OVERVIEW

A concourse resource to deploy a docker image from dockerhub on a machine via ssh.

HOW TO USE

To use this resource, you will provide the following dockerhub information in the pipeline,

Then define the machine where you want and what dockerhub image to deploy,

The resource is,

resource_types:

  - name: deploy-docker
    type: docker-image
    source:
      repository: jeffdecola/concourse-deploy-docker-resource
      tag: latest

resources:

  - name: test-resource-deploy-docker
    type: deploy-docker
    icon: docker
    source:
      username: jeffdecola
      password: ((dockerhub_password))

And to use as a put,

- put: test-resource-deploy-docker
  params:
    DOCKER_HOST_IP: '192.168.20.124'
    DOCKER_HOST_PORT: '22'
    DOCKER_HOST_USER: 'jeffdecola'
    DOCKER_HOST_RUN_PRIVILEGED_MODE: 'true'
    DOCKER_HOST_SSH_PRIVATE_KEY_FILE: 
    DOCKER_IMAGE_TO_DEPLOY: 'jeffdecola/crypto-miner-manager'

HOW I BUILT AND PUSHED THIS RESOURCE (REFERENCE)

Refer to my concourse-resource-template on how I built this resource.

To build.sh using the Dockerfile,

cd build-resource-using-bash/build
sh build-resource.sh

Note how a concourse base image is used to build the resource.

To push.sh the resource docker image to dockerhub,

cd build-resource-using-bash/push
sh push.sh

You can check this docker image,

docker images jeffdecola/concourse-deploy-docker-resource
docker run --name concourse-deploy-docker-resource -dit jeffdecola/concourse-deploy-docker-resource
docker exec -i -t concourse-deploy-docker-resource /bin/bash
docker logs concourse-deploy-docker-resource
docker rm -f concourse-deploy-docker-resource