Closed ruipin closed 9 years ago
Why would you want to do this? It is already possible to do this by creating a repositories.json
file in $HOME/.subuser/repositories.json
, or /etc/subuser/repositories.json
as described in the repositories.json standard. However, doing so, would mess up the XPRA X11 bridge, as the XPRA images are built from default
.
Well, I noticed that the Xpra bridge complains in the console on how OpenGL support isn't active (it doesn't have python-numby and some other packages installed). I was looking into fixing this (it should be a matter of also installing the missing packages), but couldn't find a way to override the xpra image file.
You cannot edit the files in ~/.subuser/repositories/
because subuser's update system is atomic and tracks git hashes (rather than checked out files). The proper way of developing the default
repository is to create a ~/.subuser/repositories.json
file which looks like:
{
"default" : {"source-dir" : "/path/to/new/default/repo"}
}
This will over-ride the default default repository and will use the actual files (not what is checked into git) found in the specified path.
If you were to write:
{
"default" : {"git-origin" : "file:///path/to/new/default/repo"}
}
Then it would use the files checked into the master
branch of the same location.
Huh. That explains quite a bit. Just tested it and it works, thanks.
I wanted to add OpenGL acceleration support to the xpra image. For that, I was playing around with the image in my local system, but I noticed that no matter what changes I made, it wouldn't apply them.
I would for example add
to the dockerfile for xpra, and it wouldn't run it. To make sure my changes weren't being ignored, I renamed the "repositories/default/xpra" folder, removed all docker images through
but it just reinstalls the default xpra image as if the files were still there.
I tried to understand what was happening in the Python code, but I'm still not familiar enough with the code-base to be able to find anything "special" that explains this, though.
I managed to get it to use my changes by forking the default repositories, editing data/repositories.json to point to my fork, commiting changes, deleting all docker images through the above commands, and then delete the subuser registry and repositories folder, and then re-add my subuser.
But I have been unable to get it to use my changed xpra dockerfile without repeating that whole process every time I want to change something.