Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: ARM Support #14

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
name: Building base image
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- uses: actions/checkout@v4

- name: Set up Python
Expand All @@ -22,9 +27,9 @@ jobs:

- name: Set up packer and dependencies
run: |
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install packer
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update && sudo apt-get install packer
packer init .pkr.hcl
pip install -r requirements.txt

Expand Down
23 changes: 18 additions & 5 deletions docker/_base/build.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
source "docker" "amd64" {
changes = [
"VOLUME /data",
"WORKDIR /data",
"ENTRYPOINT /bin/bash"
]
commit = true
image = "buildpack-deps:bookworm"
pull = true
platform = "linux/amd64"
}


source "docker" "autogenerated_1" {
source "docker" "arm64" {
changes = [
"VOLUME /data",
"WORKDIR /data",
"ENTRYPOINT /bin/bash"
]
commit = true
image = "buildpack-deps:bookworm"
pull = true
commit = true
image = "buildpack-deps:bookworm"
pull = true
platform = "linux/arm64"
}

build {
sources = ["source.docker.autogenerated_1"]
sources = ["source.docker.amd64", "source.docker.arm64"]

provisioner "ansible" {
playbook_file = "ansible/playbook.yml"
Expand Down
21 changes: 15 additions & 6 deletions docker/java/openjdk11.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@ variable "image_tag" {
default = env("IMAGE_TAG")
}

source "docker" "autogenerated_1" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
source "docker" "amd64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
platform = "linux/amd64"
}

source "docker" "arm64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
platform = "linux/arm64"
}

build {
sources = ["source.docker.autogenerated_1"]
sources = ["source.docker.amd64", "source.docker.arm64"]

provisioner "ansible" {
playbook_file = "ansible/openjdk11.yml"
Expand Down
21 changes: 15 additions & 6 deletions docker/java/openjdk17.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@ variable "image_tag" {
default = env("IMAGE_TAG")
}

source "docker" "autogenerated_1" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
source "docker" "amd64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
platform = "linux/amd64"
}

source "docker" "arm64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
platform = "linux/arm64"
}

build {
sources = ["source.docker.autogenerated_1"]
sources = ["source.docker.amd64", "source.docker.arm64"]

provisioner "ansible" {
playbook_file = "ansible/openjdk17.yml"
Expand Down
21 changes: 15 additions & 6 deletions docker/kube/kube.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@ variable "image_tag" {
default = env("IMAGE_TAG")
}

source "docker" "autogenerated_1" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
source "docker" "amd64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
platform = "linux/amd64"
}

source "docker" "arm64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
platform = "linux/arm64"
}

build {
sources = ["source.docker.autogenerated_1"]
sources = ["source.docker.amd64", "source.docker.amd64"]

provisioner "ansible" {
playbook_file = "ansible/playbook.yml"
Expand Down
21 changes: 15 additions & 6 deletions docker/nodejs/nodejs.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@ variable "image_tag" {
default = env("IMAGE_TAG")
}

source "docker" "autogenerated_1" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
source "docker" "amd64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
platform = "linux/amd64"
}

source "docker" "arm64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
platform = "linux/arm64"
}

build {
sources = ["source.docker.autogenerated_1"]
sources = ["source.docker.amd64", "source.docker.arm64"]

provisioner "ansible" {
playbook_file = "ansible/playbook.yml"
Expand Down
21 changes: 15 additions & 6 deletions docker/terraform/terraform.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@ variable "image_tag" {
default = env("IMAGE_TAG")
}

source "docker" "autogenerated_1" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
source "docker" "amd64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
platform = "linux/amd64"
}

source "docker" "arm64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = true
platform = "linux/arm64"
}

build {
sources = ["source.docker.autogenerated_1"]
sources = ["source.docker.amd64", "source.docker.arm64"]

provisioner "ansible" {
playbook_file = "ansible/playbook.yml"
Expand Down
Loading