From the course: Learning GitHub Actions

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Add a Dockerfile

Add a Dockerfile

- [Instructor] Now that we have an objective for our custom action, we need a repository and a Dockerfile. I'm working on a brand-new public GitHub repo that I've cloned to my local system. I've already coded the Dockerfile, so let's take a look at it. If you're following along, the files I'm working with are available in the exercise files. At the top of the file is the from directive. This sets Alpine Linux as the base image for our container. After that, we install the tools we'll need to make our action work with the run command. Alpine uses the APK command to install packages. The arguments for the APK command list the packages we need to install. We're installing bash, httpie, and JQ. We'll use bash as the interpreter for our script and we'll need httpie to interact with the GitHub API. We'll use JQ to work with data in json format. I'll also include some calls to the which command, so we can see where the tools get…

Contents