-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Signed-off-by: l00397676 <lujingxiao@huawei.com>
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hinews
Sorry for forgetting to rebase to v19.03.5, please try again with this one.
Tested with the Dockerfile you provided:
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Lu Jingxiao
I successfully built the docker-ce and updated build files in /usr/bin.
[centos$ docker version
And when building this Dockerfile:
I see that hostname didn't change:
Could you try it on your side with enabled build option "--progress=plain" and
check that hostname changed in each RUN command?
With regards,
Yosef
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hinews
It works with driver docker:
But you're using driver
docker-container
, I need some time to dig with this driver. You may try with driverdocker
first?f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hinews
When using driver
docker-container
, dockerd will pullmoby/buildkit:buildx-stable-1
and run it. When building images, dockerd will use the buildkitd in that container.So you'll have to build your own buildkit image (with patch) and re-create the driver with it.
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jingxiaolu
I tried with docker driver and it's works the same as in your output.
But I have one issue:
When the second RUN command executed - before I changed environment HOSTNAME to the new value secondhostname but it didn't affect, the second RUN command still using variable that I set from --build-arg
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can I do it?
As I tried before
or something else I need to run?
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jingxiaolu
Regarding secondhostname issue, It will be good to solve but if you don't have time - leave it. The idea was to change hostname in Dockerfile by arg HOSTNAME, so each layer will run with customized hostname.
Regarding docker-container driver, I didn't understand how to rebuild it.
Anyway, You helped me a lot and solved the main issue that now I can run docker build with specific hostname. Could you merge it to the docker-ce that we can use it in our production systems?
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hinews
Sorry for reply late (fighting for a milestone 🤕 )
When building with legacy docker build (not with buildkit), will it takes affect? If so, I think you can raise a new issue and asks for update. I think it may not an easy issue but I'm also new to buildkit.
I may push a PR to buildkit next week, and then re-vendor to docker-ce when it is merged in buildkit.
Does driver docker meet your requirement? If not, could you wait for me raise the PR first, then you use that PR on building it?
Many thanks :-D
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jingxiaolu
Thanks for your answers, I waited each day)
Fine, I will wait for merge of PR
With regards,
Yosef
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jingxiaolu
could you update me when are you going to raise PR?
I just want that this change will go to the nearest docker-ce release 19.03.06
Thanks!
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hinews
sorry for late, just back from a milestone war...
here it is for buildkit : moby/buildkit#1339
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jingxiaolu
Thank you very much!
This PR contains support both for docker and docker-container driver and for buildx cli?
With regards,
Yosef
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hinews
MR for buildkit, once merged --> update buildkit image --> docker-container driver of buildx can use it
MR for buildkit, once merged --> update version of buildkit in docker-ce --> docker driver of buildx can use it
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jingxiaolu
How are you? Could you update me about pull request, it's about month is waiting status.
Thanks you a lot for help!
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hinews
Sorry I don't have much time on it, daily work and family took it. I'll try to find some time to update it but I'm afraid I can't guarantee the deadline...
If you or your college can take it, I'm OK~
f11dffc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jingxiaolu
How are you? I saw that our PR tagged for 0.8.0 version: https://github.com/moby/buildkit/milestone/8
I hope it will be resolved, just half-year passed )
I took the new machine and installed docker-ce, it installed the latest one 19.03.12 and the previous one 19.03.06 on which we tested is not available more in centos yum repository.
I tried to build the docker from your branch but now it's failing, maybe it's related to docker-ce version. Could you check if the error message tells you something, if it's related to docker-ce version, I will try to build it from sources: https://github.com/docker/docker-ce/archive/v19.03.6.zip
Please check the logs below.
First of our, I installed docker-ce
sudo yum install -y docker-ce docker-ce-cli containerd.io
Then I run
git clone https://github.com/jingxiaolu/docker-ce
cd docker-ce
git checkout hostname
sudo make static DOCKER_BUILD_PKGS=static-linux
Many thanks,
Yosef