build-tools: image update script corrupts docker entrypoint commands

Bug #2038460 reported by Davlet Panech
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
New
Undecided
Unassigned

Bug Description

Brief Description
-----------------
The script sometimes corrupts ENTRYPOINT and CMD entries in the images being updated. The logic that parses these entries in "docker image inspect" output seems incorrect: https://opendev.org/starlingx/root/src/commit/c2d62e59173832e4597249817b891b990f5d6600/build-tools/build-docker-images/update-stx-image.sh#L456

Observed with starlingx/rvmc image. Original image had:

            "Entrypoint": [
                "/bin/sh",
                "-c",
                "/usr/local/bin/rvmc.py --target $target --debug $debug"
            ],

But after modification it becomes

            "Entrypoint": [
                "/bin/sh",
                "-c",
                "/usr/local/bin/rvmc.py",
                "--target",
                "$target",
                "--debug",
                "$debug"
            ],

A similar problem exists with "CMD" .

Severity
--------
Major

Steps to Reproduce
------------------
See above

Expected Behavior
------------------
See above

Actual Behavior
----------------
See above

Reproducibility
---------------
Reproducible

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
master/2023-10-04

Last Pass
---------
None

Timestamp/Logs
--------------
N/A

Test Activity
-------------
N/A

Workaround
----------
Correct entrypoint manually using "docker run/docker commit"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.