Code Monkey home page Code Monkey logo

rs-docker's Introduction

Docker-Style FS and Process Isolation

A lightweight implementation of Docker-style filesystem and process isolation, along with handling for registry images. It shows core Docker functionalities for educational purposes or lightweight use cases

Table of Contents

Introduction

This project mimics essential Docker functionalities, including filesystem isolation, process isolation, and registry image management. It's designed to help users understand how Docker works under the hood and to provide a lightweight alternative for specific use cases

Features

  • Filesystem Isolation: Implements isolated filesystems using chroot for containers
  • Process Isolation: Ensures processes run in separate namespaces using unshare
  • Registry Image Handling: Supports pulling and storing images from a registry

Prerequisites

Before you begin, ensure you have the following:

  • Docker installed. Follow the instructions on the Docker website to install Docker
  • A Linux environment or Windows with WSL2 for running the scripts.
    • I recommend using Docker (i know, trippy) in order to run in MacOS or Windows using the rs-docker.sh script. Currently working on a better way

Installation

  1. Clone the repository:

    git clone https://github.com/dpouris/rs-docker
    cd rs-docker
  2. Ensure the scripts have Unix-style line endings. If you cloned the repo on Windows, run:

    sed -i -e 's/\r$//' /app/rs-docker.sh

Usage

Supported commands


Currently the only supported command is run but in the future I plan to implement most, if not all, of Dockers main commands and some more helper commands.

  • run: rs-docker run <image> <command> <arg1> <arg2> ...

Using rs-docker.sh (Windows/MacOS)

Run the provided script:

chmod +x ./rs-docker.sh
./rs-docker.sh run ubuntu:latest echo "hello world"

Running the code on system (Linux)

  1. Build src

    cargo build --release
  2. Run the program using the supported commands:

    ./target/release/rs-docker run ubuntu:latest echo "hello world"

rs-docker's People

Contributors

dpouris avatar

Stargazers

Sal DiStefano avatar Val213 avatar SMALLC avatar  avatar  avatar sn0vvdr3am avatar  avatar  avatar  avatar  avatar  avatar 极速蜗牛 avatar Marcos Freitas de Morais avatar  avatar

Watchers

 avatar

Forkers

mu-l

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.