{"id":13505529,"url":"https://github.com/s-zeid/elements","last_synced_at":"2025-03-30T00:31:02.522Z","repository":{"id":141176751,"uuid":"172117952","full_name":"s-zeid/elements","owner":"s-zeid","description":"A tool to generate single-file, runc-based AppImage containers.","archived":false,"fork":false,"pushed_at":"2020-06-21T03:56:50.000Z","size":77,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-01T03:32:30.715Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://code.s.zeid.me/elements","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s-zeid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-02-22T18:47:45.000Z","updated_at":"2024-08-19T13:48:11.000Z","dependencies_parsed_at":"2024-01-02T23:05:18.001Z","dependency_job_id":"8cc22466-8105-4dd8-8855-0762b67aec2a","html_url":"https://github.com/s-zeid/elements","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-zeid%2Felements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-zeid%2Felements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-zeid%2Felements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-zeid%2Felements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s-zeid","download_url":"https://codeload.github.com/s-zeid/elements/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246262490,"owners_count":20749170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T00:01:09.435Z","updated_at":"2025-03-30T00:30:57.497Z","avatar_url":"https://github.com/s-zeid.png","language":"Python","funding_links":[],"categories":["AppImage developer tools"],"sub_categories":["Tools to convert from other package formats"],"readme":"[Elements](https://www.youtube.com/watch?v=N0ziDSLJhq4)\n=======================================================\n\n[![](https://img.shields.io/badge/license-X11-green.svg?style=flat-square)\n](LICENSE.txt)\n[![](https://img.shields.io/badge/status-pre--alpha-red.svg?style=flat-square)\n]()\n\nA tool to generate single-file, runc-based AppImage containers.\n\nCopyright (c) 2019 S. Zeid.  Some rights reserved under the X11 License.\n\n\u003chttps://elements.s.zeid.me/\u003e\n\n**WARNING:**  Elements is not ready for production.  It is an experiment\nin the early stages of development.  Although I make a best effort to not\ncommit broken code, there is no automated testing, there may be breaking\nchanges in future commits, there may be security or data loss bugs, and\nthere is no guarantee of long-term maintenance.  As the license states,\nuse at your own risk.  :)\n\n*                        *                        *                        *\n\nElements is a tool to generate runc-based containers which are self-contained\nin a single AppImage file.  The definition file can be used to specify if\nand how parameters such as bind mounts and environment variables are passed\nas arguments to the container's AppImage.\n\n\nCurrent limitations\n-------------------\n\nElements is currently a prototype written in a combination of Python 3 and\nPOSIX shell.  I plan to rewrite it in a compiled language other than Go,\nbut in the meantime there are some drawbacks to the current implementation:\n\n* Currently, Elements uses an extended version of [Singularity Definition\n  Files][sdf] to define containers and has a container build-time dependency\n  on Singularity.  (Singularity is not used to run Elements containers, and\n  unlike Singularity, **filesystems, PID and IPC namespaces, and the\n  environment ARE contained by default**.)  \n    \n  This means that root is required to build the container image, layer\n  caching is non-existent, and the definition format is completely different\n  from Dockerfiles.  I plan to switch to Buildah and an extended (but\n  backwards-compatible) Dockerfile syntax, which will resolve all these issues.\n\n* At build time, Elements creates a POSIX-compliant (portable) shell script\n  which is shipped in the AppImage.  This script parses the user-supplied\n  arguments and constructs, runs, and tears down the underlying runc container\n  at a temporary path.  This script relies on a minimal (~3 MB compressed)\n  Alpine Linux rootfs, which is generated at container build time, is\n  included in the AppImage, and contains jq for the purpose of configuring\n  runc.  Shell was chosen because I'm currently not familiar enough with\n  modern compiled languages, I wanted an MVP up and running as quickly as\n  possible, and I did not want to ship an interpreter in the container image.\n  Dollar sign variable syntax also comes for free with shell (although the\n  builder sanitizes variables in the definition file when generating the\n  script).\n  \n  The fact that this is a shell script, the script itself is inefficient, and\n  it has to start up and tear down a container just for jq multiple times\n  obviously results in slower startup times and increased attack surface.\n  I plan to switch to a compiled runtime binary that includes its own\n  (third-party) JSON library and also uses an intermediate config file to\n  define the command-line arguments and other parts that are currently\n  generated by the Python builder.  I may also decide to include extended\n  support for POSIX parameter expansion (e.g. `${thing:-default}` to use\n  a default value if `$thing` is unset or empty), which would use an\n  in-house parser instead of relying on shell.\n\n\nThere is no timeline for the rewrite, and there is also no guarantee that it\nwill even happen.  If and when the rewrite is committed, it will _not_ be\nbackwards-compatible with current definition files.\n\n\n[sdf]: https://www.sylabs.io/guides/3.0/user-guide/definition_files.html\n\n\n## [Documentation](https://elements.s.zeid.me/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-zeid%2Felements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs-zeid%2Felements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-zeid%2Felements/lists"}