{"id":24865046,"url":"https://github.com/voyrox/qube","last_synced_at":"2025-04-13T00:53:30.433Z","repository":{"id":274778586,"uuid":"924009378","full_name":"Voyrox/Qube","owner":"Voyrox","description":"A container runtime written in Rust","archived":false,"fork":false,"pushed_at":"2025-03-22T03:22:10.000Z","size":1138,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T00:53:20.514Z","etag":null,"topics":["containers","docker","kubernetes","oci","rust"],"latest_commit_sha":null,"homepage":"https://voyrox.github.io/Qube/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Voyrox.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Voyrox","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2025-01-29T08:49:48.000Z","updated_at":"2025-03-22T03:22:13.000Z","dependencies_parsed_at":"2025-01-29T11:20:02.391Z","dependency_job_id":"b7704cff-9f8c-424c-b501-8dc086934101","html_url":"https://github.com/Voyrox/Qube","commit_stats":null,"previous_names":["voyrox/qube"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voyrox%2FQube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voyrox%2FQube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voyrox%2FQube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voyrox%2FQube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Voyrox","download_url":"https://codeload.github.com/Voyrox/Qube/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650439,"owners_count":21139672,"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":["containers","docker","kubernetes","oci","rust"],"created_at":"2025-01-31T23:57:16.924Z","updated_at":"2025-04-13T00:53:30.409Z","avatar_url":"https://github.com/Voyrox.png","language":"Rust","funding_links":["https://github.com/sponsors/Voyrox"],"categories":[],"sub_categories":[],"readme":"[![GitHub contributors](https://img.shields.io/github/contributors/Voyrox/Qube)](https://github.com/Voyrox/Qube/graphs/contributors)\n[![Github CI](https://github.com/Voyrox/Qube/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/Voyrox/Qube/actions)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./docs/assets/images/logo.png\" width=\"450\"\u003e\n\u003c/p\u003e\n\n## Features\n- Lightweight and fast container runtime.\n- Written in Rust for memory safety and performance.\n- Supports basic container isolation using Linux namespaces.\n\n## Motivation\nQube aims to provide a lightweight, secure, and efficient container runtime. Rust's memory safety and performance make it an ideal choice for implementing container runtimes. Qube is designed to be simple yet powerful, with a focus on extensibility and security.\n\n# 🚀 Quick Start\n\u003e [!TIP]\n\u003e You can immediately set up your environment with youki on GitHub Codespaces and try it out.  \n\u003e\n\u003e [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/containers/Qube?quickstart=1)\n\u003e ```console\n\u003e $ cargo build --release\n\u003e $ sudo ln -s /mnt/e/Github/Qube/target/release/Qube /usr/local/bin/Qube\n\u003e $ cp qubed.service /etc/systemd/system/qubed.service\n\u003e $ systemctl daemon-reload\n\u003e ```\n\n# 📍 Status of Qube\n\n### Manage Containers\n- Run a container\n\n  ### Prebuilt Images\n  - `Ubuntu24_Multi`: A multi-purpose Ubuntu 24.04 container with Node.js, Rust, and Python3 pre-installed.\n  - `Ubuntu24_NODE`: A Node.js container based on Ubuntu 24.04.\n  - `Ubuntu24_RUST`: A Rust container based on Ubuntu 24.04.\n  - `Ubuntu24_PYTHON`: A Python3 container based on Ubuntu 24.04.\n  - `Ubuntu24_GOLANG`: A Go container based on Ubuntu 24.04.\n  - `Ubuntu24_JAVA`: A Java container based on Ubuntu 24.04.\n\n  Registers a container (with a placeholder PID) and starts it automatically via the daemon. | Add `--isolation` to disable the network namespace.\n  ```bash\n  sudo Qube run --image Ubuntu24_Multi -cmd \"\u003ccmd\u003e\"\n  # e.g.\n  sudo Qube run --image Ubuntu24_NODE --ports 3000 --cmd \"npm i \u0026\u0026 node index.js\"\n  ```\n\n  ### QML File\n  The QML file is used to define the configuration and behavior of your containers. It allows you to specify various settings such as the container's name, image, command, ports, and more. Here is an example of a QML file:\n\n  ```yaml\n  container:\n    # The base system image to use for the container.\n    system: Ubuntu24_NODE\n\n    # Ports to be exposed by the container.\n    ports:\n      - \"3000\"\n\n    # Command to run inside the container.\n    cmd:\n      - npm install\n      - node index.js\n\n    # Optional: Enable network isolation for the container.\n    isolated: false\n\n    # Optopnal: Add Enviromental variables to the container.\n    enviroment:\n      - SUPER_TOKEN = \"1234567890abcdefghijklmnopqrstuvwxyz\"\n\n    # Optional: Volumes to mount into the container.\n    volumes:\n      - host_path: \"/path/on/host\"\n        container_path: \"/path/in/container\"\n\n    # Optional: Enable debug mode for more verbose output.\n    debug: false\n  ```\n\n  To use the QML file, you need to run the `run` command in the same directory as the QML file. The `run` command will automatically detect the QML file and use it to create the container.\n  ```bash\n  sudo Qube run\n  ```\n  \u003cimage src=\"./images/download.png\" style=\"display: block;margin-left: auto;margin-right: auto;\"\u003e\n  \u003cimage src=\"./images/image.png\" style=\"display: block;margin-left: auto;margin-right: auto;\"\u003e\n\n- List running containers\n\n  Displays all tracked containers, along with their PIDs, uptime, and status.\n  ```bash\n  sudo Qube list\n  ```\n  \n- Stop a container\n  Immediately Stops a container by sending it a SIGKILL.\n\n  ```bash\n  sudo Qube stop \u003cpid|container_name\u003e\n  ```\n\n- Start a container\n  Starts a stopped container.\n\n  ```bash\n  sudo Qube start \u003cpid|container_name\u003e\n  ```\n\n- Eval a container\n  \n  Allows you to attach to a container (by name or PID) and run commands as root inside it.\nWARNING: Running commands as root inside a container may alter its configuration and pose security risks. Use with caution!\n\n  ```bash\n  # Launch an interactive shell in the container:\n  sudo Qube eval \u003ccontainer_name|pid\u003e\n\n  # Execute a specific command as root in the container:\n  sudo Qube eval \u003ccontainer_name|pid\u003e [command]\n  ```\n\n- View container info\n  Shows detailed information about a container, such as its name, PID, working directory, command, timestamp, and uptime.\n\n  ```bash\n  sudo Qube info \u003ccontainer_name|pid\u003e\n  ```\n- Snapshot a container\n  Creates a snapshot (a compressed tarball) of the container’s filesystem. The snapshot is stored in the container's working directory.\n\n  ```bash\n  sudo Qube snapshot \u003ccontainer_name|pid\u003e\n  ```\n- Run a container based on a dockerfile\n  Creates a container based on a Dockerfile. The container is stored in the containers directory.\n\n  ```bash\n  sudo Qube docker\n  ```\n\n# Custom Images 📦\n- Create a custom image\n  Creates a custom image from a container. The image is stored in the images directory.\n\n  ### Default Image\n  - Node.js\n  - Rust\n  - Python3\n\n  #### Options\n  - `INSTALL_NODE=true` Install Node.js and npm.\n  - `INSTALL_RUST=true` Install Rust.\n  - `INSTALL_PYTHON=true` Install Python.\n  - `INSTALL_GOLANG=true` Install Go.\n  - `INSTALL_JAVA=true` Install Java.\n\n ```bash\n INSTALL_\u003cNAME\u003e ./buildIMG/install_and_pack.sh\n ```\n\n### API\n\n#### `/list\n- GET\n- Lists all running containers, along with their PIDs, uptime, and status.\n  - Response: `{\"containers\": \u003ccontainers\u003e}`\n  - Example: `curl http://localhost:8080/list`\n\n#### `/stop`\n- POST\n- Stops a container by sending it a SIGKILL.\n  - Request Body: `{\"pid\": \u003cpid\u003e}`\n  - Response: `{\"status\": \"success\"}`\n  - Example: `curl -X POST -d '{\"pid\": 1234}' http://localhost:8080/stop`\n\n#### `/start`\n- POST\n- Starts a stopped container.\n  - Request Body: `{\"pid\": \u003cpid\u003e}`\n  - Response: `{\"status\": \"success\"}`\n  - Example: `curl -X POST -d '{\"pid\": 1234}' http://localhost:8080/start`\n\n#### `/eval`\n- POST\n- Allows you to attach to a container (by name or PID) and run commands as root inside it.\n  - Request Body: `{\"pid\": \u003cpid\u003e, \"command\": \u003ccommand\u003e}`\n  - Response: `{\"output\": \u003coutput\u003e}`\n  - Example: `curl -X POST -d '{\"pid\": 1234, \"command\": \"ls\"}' http://localhost:8080/eval`\n\n#### `/info`\n- POST\n  - Shows detailed information about a container, such as its name, PID, working directory, command, timestamp, and uptime.\n    - Request Body: `{\"pid\": \u003cpid\u003e}`\n    - Response: `{\"info\": \u003cinfo\u003e}`\n    - Example: `curl -X POST -d '{\"pid\": 1234}' http://localhost:8080/info`\n\n#### `/delete`\n- POST\n- Deletes a container and its associated resources.\n  - Request Body: `{\"pid\": \u003cpid\u003e}`\n  - Response: `{\"status\": \"success\"}`\n  - Example: `curl -X POST -d '{\"pid\": 1234}' http://localhost:8080/delete`\n\n# Dependencies\nInstall the required dependencies:\n\n```bash\nsudo apt-get install -y build-essential libseccomp-dev libssl-dev tar\n```\n\n### Dev Notes\n\n#### Building the Docs Site\n```bash\nbundle install\nbundle exec jekyll serve\n```\n\n#### Reset testing environment\n```bash\nrm -rf /var/lib/Qube/containers.txt \u0026\u0026 rm -rf /var/tmp/Qube_containers/Qube-\n```\n\n### Roadmap\n- [ ] Resource Limiting: Add support for limiting CPU, memory, and disk usage. `sudo Qube run --image Ubuntu24_Multi --cpu 2 --memory 512M --cmd \"npm i \u0026\u0026 node index.js\"`\n- [ ] Restore: Allow users to save the state of a container and revert to it later. `sudo Qube snapshot restore \u003csnapshot_id\u003e` | `sudo Qube snapshot create \u003ccontainer_name|pid\u003e`\n- [ ] Rootless Containers: Add CLONE_NEWUSER and map UID/GIDs to avoid requiring sudo.\n- [ ] Security: Integrate seccomp, capabilities, and AppArmor/SELinux for enhanced security.\n\n### Contributing\nYour ideas and contributions are welcome! Feel free to open issues or submit pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoyrox%2Fqube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoyrox%2Fqube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoyrox%2Fqube/lists"}