-
Notifications
You must be signed in to change notification settings - Fork 65
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
Building a new package does not use intermediate images #335
Comments
It probably depends on the fact that I am using the following base image FROM-SUBUSER-IMAGE libx11@default which uses |
Subuser is configured to rebuild everything when it builds an image. Otherwise, the images that were built would be out of date. For testing when creating a package, it is therefore better to use a dev subuser. Run this command in the repository:
The It is also possible to pass the As for being able to play with images and test build steps, the best way to do this in my opinion would be to run Here is some example output:
I can now issue Hope this helps, |
Hi @timthelion, thanks for the info, I will look into them. I also think that this could be useful information to put in the tutorial on packaging. |
Hi,
I am trying to build a new package, with the idea of submitting a pull request to subuser-security/subuser-default-repository.
However, I am finding this being more difficult than it should be, especially in terms of build time and bandwidth consumption.
I have been following the packaging tutorial and I have already contributed a package in the past.
Here's my package structure:
Now, I would change
SubuserImagefile
and then I would try to build it with:Let's say that this build fails at some point in the middle because of some error in the
SubuserImagefile
, in this case I would need to change theSubuserImagefile
and try to build again:This takes quite a long time because all the command in the
SubuserImagefile
are executed from scratch, subuser is not reusing intermediate images even if a part of the previous built was successful.I have tested it with an image with no
apt-get update
orapt-get upgrade
commands because I know that this command produce different inputs and so the layers created would be different.I tested this by adding the line at the end of the
SubuserImagefile
:and the image gets rebuilt from scratch.
In principle subuser should be able to reuse the intermediate images when they are the same, which is something that Docker can do when building, if I recall correctly.
So, am I doing something wrong?
p.s.: furthermore, I would also say that it would be nice to have a way to have
sudo
in containers (see also #324) so that I could launch a shell in a subuser and try out commands in a partial build. Should I file a separate bug with this request?The text was updated successfully, but these errors were encountered: