Closed andred closed 4 years ago
Hi @andred,
In your commit message you say "This had two issues:", what is this?
Also if you give an example command line using the poky-container using "standard docker invocation" which is what you desire, vs. what you are considering non-standard, it will help me understand.
Hi @rewitt1,
'this' in the first sentence refers to poky-entry.py in particular, but more generally how this image expects itself to be started.
A normal docker run command line would be e.g (adopted from the runtests.sh script, which I have forgotten to modify in my patch):
docker run --rm -v $LOCAL_WDIR:/workdir:Z --workdir=/workdir $IMAGE "/workdir/$i"
whereas this image wants to be started as
docker run --rm -v $LOCAL_WDIR:/workdir:Z $IMAGE --workdir=/workdir --cmd="/workdir/$i"
i.e.:
The problem with that is:
ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument. See https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#entrypoint for entrypoint best practices.
Does this make it more clear? If yes, I'll update the commit message (and also update the runtests.sh script)
Yes I understand.
Originally, I didn't want anyone to be able to use the container as a general purpose container for running arbitrary commands. The reasoning behind that was so that if a user said "The container isn't working", I wouldn't ever have to worry about commands that didn't use the entry point. The "--cmd" argument was intended for testing only.
However, if it is useful for you to be able to run arbitrary commands, such as a script to run bitbake similar to runbitbake.py, then this change makes sense.
I'll add my questions about the changes to the review.
@andred, If you're wondering why I force pushed to your branch, its because I tried using the github web editor to fix a merge conflict, and it replaced the original commit with the merge commit. I'm really not sure what happened.
The new commit that I pushed to your branch, is your original commit with the merge conflict fixes. I wanted to make sure you got credit and the history stayed around.
This had two issues:
Both are non-standard behaviour, and in particular conflict with the Jenkins docker plugin's expected use of docker images, as that relies on standard behaviour.
We now:
Signed-off-by: André Draszik andre.draszik@jci.com