Closed Oneiroi closed 1 year ago
This should be also added to the post-processors.
Is there any workaround until #103 is merged?
We have released v1.0.6
with this enhancement. CHANGELOG
Example template:
source "docker" "oraclelinux" {
image = "oraclelinux:8"
platform = "linux/amd64"
commit = true
}
build {
name = "docker-with-platform"
sources = [
"source.docker.oraclelinux",
]
}
Please search the existing issues for relevant feature requests, and use the reaction feature (https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to add upvotes to pre-existing requests.
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request. If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Description
Support for docker's
--platform
option added todocker pull
, to support cross arch image builds from differing architecture host OS'sUse Case(s)
packer
use aarch64 operating systems such as M1 and other M Series Apple silicon, future Thinkpad X13s snapdragon usePotential configuration
Amendment of this section https://github.com/hashicorp/packer-plugin-docker/blob/0be3f45624069293b05a6e50323afbcefbd97c88/builder/docker/driver_docker.go#L275 to permit the passing of the platform/arch target (injecting
--platform
e.g.docker pull --platform=linux/amd64 image:TAG
(https://docs.docker.com/engine/reference/commandline/pull/#options)Potential References
https://docs.docker.com/engine/reference/commandline/pull/#options
hcl
file snippet:packer build -debug
:Image string
does not appear to be passed verbatim, as the following shows this is valid: