mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-03 02:46:10 +02:00
As mentioned in #346, if only ENTRYPOINT is set in a stage then any CMD inherited from a parent should be cleared. If both entrypoint and cmd are set then nothing should change. I added a function and unit test to review the config file after building a stage which clears out config.Cmd if ENTRYPOINT was declared but CMD wasn't. I also added an integration test to make sure this works, which should be tested by the preexisting container-diff --metadata test.
6 lines
127 B
Plaintext
6 lines
127 B
Plaintext
FROM scratch AS first
|
|
CMD ["mycmd"]
|
|
|
|
FROM first
|
|
ENTRYPOINT ["myentrypoint"] # This should clear out CMD in the config metadata
|