Closed hongyi-zhao closed 3 years ago
Sorry, no idea. I did never use the ARG instruction. From what I can see, your setup looks right.
It seems the environment variables set this way can't be picked by the docker hub autobuild service. Instead, the build hook script based method should be used for more advanced image build flow control. See the following websites/projects for more info on this subject:
https://github.com/andyneff/docker_hook_test
https://docs.docker.com/docker-hub/builds/advanced/
https://github.com/docker/hub-feedback/issues/508
https://github.com/docker/hub-feedback/issues/508#issuecomment-240397523
https://github.com/docker/hub-feedback/issues/508#issuecomment-240616319
https://dev.to/samuelea/automate-your-builds-on-docker-hub-by-writing-a-build-hook-script-13fp
And I finally do the trick with the build hook script written in bash. This method is powerful/wonderful and each commit will trigger the corresponding build process on Docker hub automatically.
I try to extend the Deepin apricot base image with the automated builds service supplied by docker hub using customized build envionment variable. The auto building service is linked to and based on the Dockerfile in my github repo here. For convenience, I use a customized environment variable to define the
CODENAME
of deepin as shown below:But I noticed that the automated builds service failed with the building log as follows:
Any hints for fixing this problem?
Regards, HY