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 - GitHub Tutorial
From the course: Learning GitHub Actions
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Plan a custom action4m 28s
-
(Locked)
Your custom action objective1m 7s
-
(Locked)
Dockerfile review4m 58s
-
(Locked)
Add a Dockerfile2m 20s
-
(Locked)
Add an entry-point script2m 30s
-
(Locked)
Use runtime environment resources4m 11s
-
(Locked)
Test an action locally3m 52s
-
(Locked)
Complete the entry-point script2m 2s
-
(Locked)
Add a metadata file2m 48s
-
(Locked)
Add a README file1m 48s
-
(Locked)
Deploy a custom action2m 22s
-
(Locked)
Publish an action to the Marketplace4m 16s
-
(Locked)
Challenge: Create a custom action1m
-
(Locked)
Solution: Create a custom action7m 47s
-
(Locked)
-