cpp-linter/clang-tools-docker

Change ENV variable to `CLANG_VERSIONS` in Dockerfiles

shenxianpeng opened this issue · 6 comments

Based on @2bndy5's proposal in the issue cpp-linter/cpp-linter-action#73

@shenxianpeng It might be easier to identify when using the docker at runtime if the docker image set a environment variable. We could probably do this from the action.yml in this repo, but it might be good to have in the docker container.

If we could more easily identify when the docker is in use (at runtime), then we can make this path prepending conditional on the presence of the docker workspace.

To meet the above needs and have a specific ENV variable name, we don't need to add a new one, just change the current ENV from VERSIONS to CLANG_VERSIONS should be OK.
https://github.com/cpp-linter/clang-tools/blob/c864e94186fd1fce17fd12775636b9cf507c5243/all/Dockerfile#L5
https://github.com/cpp-linter/clang-tools/blob/c864e94186fd1fce17fd12775636b9cf507c5243/all/Dockerfile#L15

Agreed.

Adding a new env var might also create another container "layer" (which seems to impact the setup time of pulling in the docker container).

Add new env var may also confuse others who use this image directly.

Well, it might also break for those that use this image directly if they are using the var named VERSIONS (instead of CLANG_VERSIONS). But I'm under the impression this var was only meant for the docker image itself.

Yes, maybe, change it to a meaningful var name the early the better :) it is used for the image itself.

Close as completed.

All the new images will be uploaded to the docker hub in 10 minutes, it is still making progress.