GithubHelp home page GithubHelp logo

natnat-mc / container Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 66.57 MB

Simple containerization script using systemd-nspawn

MoonScript 82.89% Makefile 3.20% C 7.72% Lua 6.19%
systemd-nspawn moonscript

container's Introduction

Codinget

A smol README.md for my profile

whoami

A random dev who enjoys {programm,sysadmin,netamdin}ing a bit too much.
Grew up on Mandriva Linux, switched to Debian, and now using Alpine more and more.
Mains Lua/MoonScript, JavaScript/Typescript and Rust, but can write fairly good Python, Java and C.

ls ~/projects

  • container, a simple containerization script based on systemd-nspawn
  • rprompt, a small prompt for fish, zsh and bash, written in rust and moonscript
  • moonbuild, a small build system written in and using moonscript
  • brightnessctl, a simple suid binary to set the screen brightness
  • Snek, a "simple" Snake, done for my final JS class project
  • rmarcher, a small cpu-rendered raymarcher in Rust capable to load Lua scenes
  • mon, a simple system monitoring tool
  • and basically everything here, on my GitLab and GitDab

ls ~/upcoming-projects

  • dashboard, a small web dashboard for my server, using lapis
  • limglib, an image organization tool
  • lcontainer no repo yet, a lighter container system, not relying on systemd

ls ~/old-projects

  • prompt, a small prompt, mainly designed for fish, the old counterpart of rprompt
  • bot-info, a discord bot for the programming school I went to, to be replaced by Administrator by a newer student now that I left
  • toolbox, a small toolbox of CLI tools based on lua, mostly replaced by lua-command-tools

TODO

  • make the README
  • work on the project themselves

container's People

Contributors

annwan avatar natnat-mc avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

annwan

container's Issues

Add `-i`, `+i` and `-p` flags

  • -i and +i would forcibly enable or disable interactive in the boot and run subcommands
  • -p would run in pipe mode, only for the run subcommand

Write actual help pages for the subcommands

Only an auto-generated usage and description is present for the commands as of now. Full help would be a plus. A subcommand could also automatically create markdown (or maybe even man) documentation.

Document `config.ini` format

config.ini is already shown in two examples, but neither of them use all of the available functionality. Proper documentation should be written.

add `container unfreeze <layer>`

container unfreeze <layer> would unpack a layer from squashfs to a directory, and update its correspoding accordingly, if applicable

add `container create-alpine <name> <arch> [version]`

Should create an alpine container with the given name, architecture and version. If no version is given, it should be autodetected from http://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/<arch>/latest-releases.yaml

Add support for older `systemd-nspawn`

Some versions of systemd-nspawn (like the one included in raspbian buster) don't support --console. There should be a global config file that tracks supported features (and maybe other things)

add `container run <machine> [command [args...]]`

container run <machine> [command [args...]] would run the specified command (or default command in config.ini, or default shell in /etc/passwd, or /bin/sh) in the container without booting the container fully

add `container merge <upper> <lower>`

container merge <upper> <lower> would merge the lower layer into the upper layer (for a directory layer) and update the corresponding machine accordingly.

Cleanup on error

As of now, the script leaves its directories and mounts as is when it crashes, and the user must find them and remove them manually. Ideally, it would happen automatically

add `container stop-all`

should basically stop all running containers, which could be useful with the systemd service to cleanly exit containers at shutdown

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.