How to connect to macos and execute a script from docker image

Background: I currently have jenkins installed on my macos and I use it to trigger shell script at regular intervals. Shell script is in my mac and all jenkins does is call the shell script. Now I’m trying to move to Concourse and do the same with Concourse (that is call shell script which is in my mac at regular intervals). I’m very new to Docker, Concourse and still trying to understand and do things in a better way

Since everything in concourse is container based. I’m trying to ssh from container to mac and execute shell script on my mac. I’m trying to use ssh-keygen and connect to mac from container. I wrote a bash script to connect to mac from container but it doesn’t work

#!/usr/bin/env bash

ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
ssh-copy-id [email protected]

pipeline.yaml file

  - name: repo
    type: git
      branch: master

  - name: some-name
    public: true
      - get: repo
      - task: some-task
          platform: linux
            type: docker-image
            source: {repository: ubuntu}

            - name: repo

            path: repo/

I get the following error message
repo/ line 3: ssh-keygen: command not found
repo/ line 4: ssh-copy-id: command not found

The docker-image I used is ubuntu. Is ssh-keygen not found in ubuntu? If I had to create a custom image with ssh-keygen, how do I pass that image to the pipeline.yml file. Please help! I understand I’ve asked too many questions. I’m new to Docker and trying to understand so any help is very appreciated.

Source: StackOverflow