Docker build files with non-bash entrypoint causes errors in build-stx-images.sh
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
High
|
Don Penney |
Bug Description
Brief Description
-----------------
Eric MacDonald reported an error in build-stx-images.sh when trying to add a new image with a custom docker build file where the image entrypoint is not a shell. The build-stx-images.sh utility tries to run the container and pass in commands to collect information, assuming the entrypoint is bash (which was originally the case for all images being built by the tool).
+ docker run --rm emacdona/
usage: rvmc.py [-h] --config_file CONFIG_FILE --target TARGET [--debug DEBUG]
rvmc.py: error: argument --config_file: expected one argument
+ docker run --rm emacdona/
usage: rvmc.py [-h] --config_file CONFIG_FILE --target TARGET [--debug DEBUG]
rvmc.py: error: argument --config_file: expected one argument
Severity
--------
Critical - new image cannot be built without an enhancement in build-stx-images.sh
Reproducibility
---------------
Reproducible
Test Activity
-------------
Developer Testing
Changed in starlingx: | |
assignee: | nobody → Don Penney (dpenney) |
tags: | added: stx.build |
Reviewed: https:/ /review. opendev. org/700434 /git.openstack. org/cgit/ starlingx/ root/commit/ ?id=a6832d18711 edbee61ff168a40 c4c53880c8b6b3
Committed: https:/
Submitter: Zuul
Branch: master
commit a6832d18711edbe e61ff168a40c4c5 3880c8b6b3
Author: Don Penney <email address hidden>
Date: Mon Nov 25 13:12:04 2019 -0500
Update image build tools to handle non-shell entrypoint
If a custom docker build file sets up a non-shell entrypoint, stx-images. sh fails during the build while trying to collect
build-
some information by running the newly built image.
This update enhances the handling to check the entrypoint and ensure
it is maintained, while using bash to run any needed commands.
Closes-Bug: 1857349 a4c81cdd2defe5d 767a4681f5b
Change-Id: I1f798476eb4976
Signed-off-by: Don Penney <email address hidden>