Closed marco-brandizi closed 3 years ago
These images we use have the bare minimum inside (even the apt cache have been stripped), so you'll have to run a "apt update;apt ugrade" and "apt install docker-ce docker-ce-cli containerd.io" or variations to install docker. Once done, docker should work I suppose.
Thanks. @uraimo, I'll try it. So, you mean, there isn't a default Docker image that it's used by all the builds and all the actions add up to it?
Exactly, no single docker image since the OS Distro is different and depending on the arch you choose. You can take a look at the actual image being used for every os/arch combination here. But one thing that is common to all of them is that to reduce the size of the image, all of them are stripped of any cache or content that can be automatically downloaded again. For example the apt cache. In you case, consider these image to be as minimal as possible, so every thing you need you'll need to install it (for example docker, that should be 300Mb or so).
Thanks, what I actually meant is that I was assuming there is an image that can be set at the beginning of the config file and that GH Actions uses for all the build steps and actions. Instead, it seems that every action can set up its own image.
Yes exactly, every step is independent and defines a new emulated context that has its lifetime limited to the step you are in. The step following a run-on-arch one starts back in the default amd64 enviroment.
I'd like to test my multiple-architecture Docker image, hence, I've tried the run-on-arch action, together with the
docker
command. Something like this:However, I get the error 'docker command not found':
Details here.
Usually, the
docker
command is available in the GH Actions host, without anything special to set, here it seems it isn't.Moreover, as I asked elsewhere, I'm not sure that I should prepare multi-arch images for all the parents that my image uses, or if doing it just for the latter is enough.