doact icon indicating copy to clipboard operation
doact copied to clipboard

Support for installing docker on the runner

Open MattIPv4 opened this issue 5 years ago • 4 comments

GitHub Actions workflows often require docker to run successfully.

It'd be great if this scripting provided an option to install docker as part of the setup process.

To manually install docker on the machine once created with terraform, I had to run:

sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

(From https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository)

MattIPv4 avatar Apr 05 '20 12:04 MattIPv4

@MattIPv4 I am not sure if it is a must have requirement. I think it's optional and only be required if you want to run workflows that use Docker container actions or service containers. I have tested the current repo with current Doact runner setup and it ran successfully. https://help.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#requirements-for-self-hosted-runner-machines Please correct me if I am wrong. Thanks.

itsksaurabh avatar Apr 05 '20 12:04 itsksaurabh

Hey! Yeah, it's a not a requirement unless you have workflows that need Docker. However, I think it'd be nice if this repo offered it as an option when provisioning runners. If that's possible?

MattIPv4 avatar Apr 05 '20 12:04 MattIPv4

@MattIPv4 yes! We could ask the user if they want to install docker during the setup process. So, would be something similar to "Y/N" user input option. Please share if you have some other ideas.

itsksaurabh avatar Apr 05 '20 12:04 itsksaurabh

That makes sense. I think providing a boolean variable for it would also be great so that provisioning can be done without interaction.

MattIPv4 avatar Apr 05 '20 12:04 MattIPv4