-
Notifications
You must be signed in to change notification settings - Fork 22
docker: initial checkin Dockerfile for nuttx github action container #13
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
Conversation
The corresponding docker image: docker pull liuguo09/ubuntu-nuttx:tagname Now it is temporarily use personal account to place. Swith to apache docker once available. Also note the toolchains packages used in Dockerfile are all locally added which should be downloaded from network instead in future. Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
|
||
WORKDIR /prebuilt | ||
|
||
ADD gcc-arm-none-eabi.tar.gz ./ |
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.
change to download from offical release website
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.
I'll update it later.
@@ -0,0 +1,34 @@ | |||
FROM ubuntu:18.04 |
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.
Change Dockerfile to another specific name, because other people may add macOS or Windows dockerfile later.
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.
Update it later.
@liuguo09 I'll make some detailed comments tonight. Including the multistage image which will resolve the issue of the local builds of the tools. |
Wish your feedback : ) |
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.
Is there a reason we are building git instead of the os version?
Sorry I don't remember very clearly. It seems in the workflow checkout stages, it mentioned to use 2.18 or later version. With the os version git 2.17.1, it doesn't work well. I'll confirm it later. |
bd840c2
to
32868f8
Compare
@liuguo09 Sorry this took me so long. Have a look at what I have done over here: The docker file is split into a bunch of stages which makes it a lot faster to rebuild and keeps the build time dependencies isolated from the rest of the image. Note that I am not downloading all of the toolchains now instead of copying local ones in. I also have a github action wired up to that to create the docker image and place it in the github project package registry. On thing I think we should consider is using that structure to create images that each have the needed toolchains they are very large and the ARM builds should not be paying the cost of the RISCV, but I think this is a later improvement that can be made. You can see this integrated and running here: Let me know how you think and we can look at moving it forward. |
@btashton thanks, I'll look into it and feedback later. |
@btashton I notice it reduce half of time for pull the docker. It's really a good job. I totally agree with using a bunch of stages in Dockerfile to faster rebuild. Do we need a official nuttx build contianer repo or just include it in testing repo?
Since now we are using our own account to create docker image, how about switch to the official https://hub.docker.com/u/apache to hold it? I have issued a Jira before https://issues.apache.org/jira/browse/INFRA-19930 and the Infra team have responded to help setup. And it required the nuttx committer permission to access. You may the right person to access as you are skilled in docker : )
If the time reduced not much now, I think it may be well to keep arm and riscv toolchains together now. But considering more toolchains coming for other archs, it may be reasonable to restructure in later improvement.
|
Did you notice that the docker container is now built via actions and stored in the GitHub package registry? That means it would be stored in the project and not require docker hub. But we can go that way I'm just not sure how much access we have to GitHub secrets for uploading the image. |
Yes, I noticed the docker publish github aciton. It seems more flexible than docker hub. If taking github package registry approach, do we need an official repo such as incubator-nuttx-build-contianers or use personal contianer project as yours is enough? |
Or is it possible just using the incubator-nuttx-testing to hold dockerfile and do docker publish github action? |
My plan was to use the incubator-nuttx-testing repo. I can submit a PR with this and the action to the repo. |
That's great! |
bd26945
to
32868f8
Compare
Replace by #17, let close it. |
The corresponding docker image:
docker pull liuguo09/ubuntu-nuttx:tagname
Now it is temporarily use personal account to place. Swith to apache docker
once available. Also note the toolchains packages used in Dockerfile are all
locally added which should be downloaded from network instead in future.