Skip to content

Commit

Permalink
feat(ARM): Adding ARM Platform on packer
Browse files Browse the repository at this point in the history
  • Loading branch information
hypery2k committed Nov 9, 2022
1 parent 69bd3da commit f9ce8ec
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 35 deletions.
18 changes: 13 additions & 5 deletions docker/_base/build.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
source "docker" "amd64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "buildpack-deps:buster"
pull = false
platform = "linux/amd64"
}

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

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

provisioner "ansible" {
extra_arguments = ["-v"]
Expand Down
21 changes: 15 additions & 6 deletions docker/ansible/build.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 = false
source "docker" "amd64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = false
platform = "linux/amd64"
}

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

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

provisioner "ansible" {
extra_arguments = ["-v"]
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 = false
source "docker" "amd64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = false
platform = "linux/amd64"
}

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

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

provisioner "ansible" {
extra_arguments = ["-v"]
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 = false
source "docker" "amd64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = false
platform = "linux/amd64"
}

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

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

provisioner "ansible" {
extra_arguments = ["-v"]
Expand Down
21 changes: 15 additions & 6 deletions docker/nodejs/build.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 = false
source "docker" "amd64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = false
platform = "linux/amd64"
}

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

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

provisioner "ansible" {
extra_arguments = ["-v"]
Expand Down
21 changes: 15 additions & 6 deletions docker/terraform/build.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 = false
source "docker" "amd64" {
changes = ["VOLUME /data", "WORKDIR /data", "ENTRYPOINT /bin/bash"]
commit = true
image = "toolisticon/base-builder-image"
pull = false
platform = "linux/amd64"
}

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

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

provisioner "ansible" {
extra_arguments = ["-v"]
Expand Down

0 comments on commit f9ce8ec

Please sign in to comment.