-
Notifications
You must be signed in to change notification settings - Fork 100
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
start of work to add singularity build from Dockerfile support! #889
base: main
Are you sure you want to change the base?
Conversation
This is a prototype or proof of concept that we can build from Dockerfile The work here currently includes support for FROM/ADD/COPY/ENV/LABEL/CMD/ENTRYPOINT and is setup to also include support for multistage builds (although this needs to be finished and I need to look into how singularity handles this with respect to copying files between stages. There is no expectation of merging this, it was a lot of fun to work on / figure out and I learned a lot! Signed-off-by: vsoch <[email protected]>
5b6ebb9
to
8ae1631
Compare
Hi @vsoch - as there's not an expectation of merging this (at least yet) - I'll mark this as a draft for now. Code looks really interesting 👍 . I'd say it's in roughly the right place for this kind of approach, and it's a great starting point for further consideration of #84. With respect to what's supported,
... which handles that in OCI image -> SIF translations. Anyway, that's just a quick look. Cheers. |
Yep this I'm aware (I'm not a container noob @dtrudg!) I have a Singularity <-> Docker converter that I made years ago and for the time being, we treat COPY and ADD as the same, assuming that users don't know this distinction and use them to add files to the container (not with the special listing of actions). If someone goes outside that use case I consider it not supported as Singularity doesn't support it. |
Yup, indeed, I know. I was not even a container noob when you were writing Singularity docker support things @vsoch 😄 Please bear with me ... I'm going to be writing things out in detail here, even if they might be known behaviours / limitations, so that we can gather thoughts on how the limitations could/would be accepted/presented. Also, so others who might not be aware of some of these issues can chime in around the topic of compatibility.
Right.. I just think we'd need to be very careful around things like the implicit tarball extraction. If someone writes or obtains a Dockerfile relying on it then we could end up copying the tarball into the rootfs verbatim (rather than extracting it), and the build failing further down when some of the extracted content is expected to be used. That would be confusing for people, who'd have to know that certain It might seem minor, and generally your assumption probably does hold, but there's a lot of stuff when you run a Docker container in Singularity that you need to be aware already of e.g. the |
Gotcha, works for me! |
Description of the Pull Request (PR):
This is a prototype or proof of concept that we can build from Dockerfile. The work here currently includes support for FROM/ADD/COPY/ENV/LABEL/CMD/ENTRYPOINT and is setup to also include support for multistage builds (although this needs to be finished and I need to look into how singularity handles this with respect to copying files between stages. There is no expectation of merging this, it was a lot of fun to work on / figure out and I learned a lot!
Signed-off-by: vsoch [email protected]
This fixes or addresses the following GitHub issues: