-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on image load if prefixed with a variable #1230
Labels
bug
Something went wrong
Comments
Hi @MaximilianB134, I have been trying to repro this issue but I am not able to. I am running tern with the below Dockerfile and it seems working fine for me.
The below 2 statements from your traceback are looking different than the Dockerfile you mentioned, Could you please provide the exact content of the Dockerfile that you are using
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Some of our Dockerfiles start with these or similar lines:
We did this mainly for historical reasons so that our devs with a Mac with an Apple Silicon chip can build images for another architecture. They would then set the ARCH build argument to
amd64/
. If the build argument is omitted the image will build for the current architecture.Unfortunately tern does not recognize the build argument correctly and fails on Dockerfiles with this construct. It seems that it tries to prepend the quotes to the image and tag and then fails to find the image.
To Reproduce
tern report -d Dockerfile
.Error in terminal
Expected behavior
I expect that the variable is resolved and therefore the Dockerfile is evaluated correctly. That especially means that the quotes from the default value are not taken literally into the image string.
Environment you are running Tern on
Output of 'tern --version':
We run tern in a docker container built from the Dockerfile this project provides here: https://github.com/tern-tools/tern/blob/main/docker/Dockerfile
The docker image is then started with two volumes, one with the dockerfile and one volume shared with a docker-in-docker setup to provide certificates to connect to the docker daemon. These env vars are provided in addition to that:
The complete setup runs in our Gitlab CI with the docker-in-docker as a service to the job and the job being the tern container.
The text was updated successfully, but these errors were encountered: