Vauxoo / travis2docker

This is a Library to transform travis to docker file
BSD 2-Clause "Simplified" License
13 stars 15 forks source link

Is --run-extra-cmds param working as expected? #209

Closed luisg123v closed 10 months ago

luisg123v commented 11 months ago

If I run something like:

travisfile2dockerfile ... --run-extra-cmds="some_command"

The command some_command is inserted at the end of 10-build.sh, which AFAIK is not correct, it should be inserted at the end of the Dockerfile file.

What do you think @moylop260 @antonag32?

moylop260 commented 11 months ago

Good idea in order to have it already store it in the image itself!

luisg123v commented 11 months ago

@moylop260

Good idea in order to have it already store it in the image itself!

Yes, but not only that. If the command is appended to the 10-build.sh file, it means it's run locally instead of being run on the built image.

antonag32 commented 11 months ago

I am not very familiar with the history behind those options but technically the "help" sections for --build-extra-cmds and --run-extra-cmds state the commands apply to the build and run scripts. I don't know if anyone actually uses them to run something extra in those scripts, so I was thinking we could:

  1. delete those arguments
  2. add a new one, maybe called --build-extra-steps which applies to Dockerfile as requested
  3. refactor one of them to apply to Dockerfile, however I think it would be confusing that one of them applies to Dockerfile and the other to its corresponding script

I like option 2, and also 1, but maybe that is too destructive, what do you think @luisg123v @moylop260

luisg123v commented 11 months ago

@antonag32 let's go with option 2