Skip to content

Building Custom Ubuntu 24.04 GitHub Runner Image with Packer #10566

Discussion options

You must be logged in to vote

Hi @koss822 Could you please try with the below template.

variable "github_runner_version" {
  default = "latest"
}

# Builder configuration
builder "docker" {
  image = "ubuntu:24.04"
  commit = true
}

# Provisioner to install dependencies and GitHub runner
provisioner "shell" {
  inline = [
    "apt-get update",
    "apt-get install -y curl",
    "curl -o actions-runner-linux-x64.tar.gz -L https://github.com/actions/runner/releases/download/v${var.github_runner_version}/actions-runner-linux-x64-${var.github_runner_version}.tar.gz",
    "tar xzf ./actions-runner-linux-x64.tar.gz",
    "./config.sh --url https://github.com/your-repo --token YOUR_GITHUB_TOKEN",
    "sudo ./svc.sh install"…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by RaviAkshintala
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants