Skip to content

GitHub Action to run docker command on the remote Docker host

License

Notifications You must be signed in to change notification settings

38ri581oq480/docker-run-command-remote-host-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

About

GitHub Action to run docker command on the remote Docker host by creating Docker context using SSH connection

Example usage 👀

Get list of images on remote Docker host

- name: List images on remote Docker host
  uses: 38ri581oq480/[email protected]
  with:
    ssh_host_key: ${{ secrets.DOCKER_HOST_SSH_HOST_KEY }}
    ssh_private_key: ${{ secrets.DOCKER_HOST_SSH_PRIVATE_KEY }}
    docker_host: my-docker-host.com
    docker_command: image ls

Deploy to remote Docker Swarm

- name: Deploy to Docker swarm
  uses: 38ri581oq480/[email protected]
  with:
    ssh_host_key: ${{ secrets.DOCKER_HOST_SSH_HOST_KEY }}
    ssh_private_key: ${{ secrets.DOCKER_HOST_SSH_PRIVATE_KEY }}
    docker_host: my-swarm-manager-node.com
    docker_command: stack deploy -c docker-compose.yml my-stack-name

About

GitHub Action to run docker command on the remote Docker host

Resources

License

Stars

Watchers

Forks

Languages