Closed josh-m-sharpe closed 6 months ago
Here's another similar example:
build {
name = "amzn2-ctm-core"
source "source.docker.dockerhub" {
image = "amazonlinux:2"
changes = [
"ENTRYPOINT [\"/bin/bash\", \"-l\", \"-c\"]",
"CMD /bin/bash"
]
}
post-processors {
post-processor "docker-tag" {
tags = [
"core_${local.timestamp}",
"core_latest"
]
}
}
}
Results in docker inspect
with this:
"Cmd": [
"/bin/sh",
"-c",
"/bin/bash"
],
"Entrypoint": [
"/bin/bash",
"-l",
"-c"
],
This is very unexpected.
Yes this breaks Dockerfile images with esoteric errors.
Community Note
Overview of the Issue
the resulting image packer produces is changing the CMD and Entrypoint (possibly other things)
After building this, comparing the images:
Why is packer doing this?
Packer version
1.8.4
Operating system and Environment details
built on, and sourcing from: amazonlinux;2