yalegria / devops-git-actions

0 stars 0 forks source link

Setup GitHub Actions to push sample application docker image to new Ubuntu Virtual Machine. #3

Open yuriaru opened 3 years ago

yuriaru commented 3 years ago

This is a sample code that Hunter found online that sort of help us on what we are trying to do. https://github.com/marketplace/actions/copy-via-ssh

yuriaru commented 3 years ago

Found this one too: https://github.com/marketplace/actions/ssh-deploy

Voxelghiest commented 3 years ago

I have written out the full code for the action that should transfer the docker image after it is made.

Docker containers are not actually stored as a single movable file. Rather, Docker only stores and modifies the data representing the topmost image of that container, and bases the rest on shared underlying images (explained better here). To convert a container into a file that can be moved, you have to use the docker save command first, which makes a .tar file that can then be transferred.

I have everything set up for that already. All I need now is to be able to access my virtual machine server from GitHub so I can test it and verify that the entire process works as intended.