4 ms·
This looks interesting! One thing I like about docker is being able to inherit from other images, so for instance in their webserver example, I could inherit fr
by antihero 3y ago
This looks interesting! One thing I like about docker is being able to inherit from other images, so for instance in their webserver example, I could inherit from a simple webserver Dockerfile and then my local code would be only the static files I wish to serve.
Is there a way to inherit from config files?
- Alifatisk 3y agoYou mean like the packages to run the unikernel? They can be shared here https://repo.ops.city https://repo.ops.city
- antihero 3y agoMore like being able to extend existing "recipes" for a unikernel, like you can with Dockerfiles. So you can have a Dockerfile that creates a general solution (e.g. nginx) and extend it to provide your exact implementation (nginx + your public files copied over into the right place).
- eyberg 3y agoThe way this works is that you take a package (like nginx or node or what-have-you) and then you use any of the configuration vars like 'File' or 'Dirs' or 'MapDirs' and the like to create the filesystem with what you want on it: https://docs.ops.city/ops/configuration#files https://docs.ops.city/ops/configuration#files . You can then deploy this as-is with a simple config.json or you can create your own new package (for instance if it's something like node and you want to share it with your team).
- antihero 3y agoAh, cool! I'll look at bundling my tiny webserver as its own package :) https://github.com/radiosilence/nano-web https://github.com/radiosilence/nano-web
- antihero 3y agoI did it!! https://repo.ops.city/v2/packages/radiosilence/nano-web/show https://repo.ops.city/v2/packages/radiosilence/nano-web/show Well chuffed. I couldn't get ops pkg push to work at all, and instead had to manually upload a tar.gz as no matter what I did, it wouldn't find my local image (though it would find it if I did ops pkg load -l nano-web_0.0.1). Is there some sort of Discord or IRC to ask dumb questions instead of spamming up HN? Either way I've made an issue: https://github.com/nanovms/ops/issues/1594 https://github.com/nanovms/ops/issues/1594
- antihero 3y agoEdit: I've made a single character fix for the bug causing the issue (regex matching)
- Alifatisk 3y agoJust watched the demo on running a Rails app on Nano, so fascinating! I wonder how much the performance gain is.