Git Product home page Git Product logo

longtea's Introduction

Longtea - Implement own container system

image

The longtea is result of container study. It is a simple container system implements by using the Linux namespace system. Since, longtea is not complete container system, it is not suitable for production use. Just use it for study.

Installation

curl -sSL https://raw.githubusercontent.com/chungjung-d/longtea/develop/install.sh | sudo bash

Command

Pull

pull the image on the docker hub. If not specified the tag, the latest tag is used.

$ sudo longtea pull -i <image name>:<tag> # pull the image with tag
$ sudo longtea pull -i <image name>       # pull the image with latest tag

example

$ sudo longtea pull -i ubuntu:22.04

Create

Create the container. If not specified the tag, the latest tag is used and defualt image tag is latest. The -n option is onptional and if not specified, the container name auto set "< image name > _ < tag >".

$ sudo longtea create -n <container name> -i <image name>:<tag>  # create the container with container name
$ sudo longtea create -i <image name>:<tag>     # create the container with image name  container name auto set <image name>_<tag>

example

$ sudo longtea create -n ubnutu_test -i ubuntu:22.04
$ sudo longtea create -i ubuntu:22.04

Start

Start the created container with container name. If the tag version is not pulled yet, it return error message.

$ sudo longtea start -n <container name>   # start the container with container name

example

$ sudo longtea start -n ubuntu_22.04

Run

Run command is combination of create and start command. If the tag version is not pulled yet, it return error message.

$ sudo longtea run -n <container name> -i <image name>:<tag>  # create and start the container with container name
$ sudo longtea run -i <image name>:<tag>     # create and start the container with image name  container name auto set <image name>_<tag>

Remove

Remove the container or image. Use -i option to remove the image and -c option to remove the container. If want to remove all image use just image name without tag.

$ sudo longtea remove -i <image name>:<tag>   # remove the image with tag
$ sudo longtea remove -i <image name>         # remove all image with image name
$ sudo longtea remove -c <container name>     # remove the container

List

List the container or image. Use -i option to list the image and -c option to list the container or use both -ic option to list all.

$ sudo longtea list -ic  # list all container and image
$ sudo longtea list -i   # list all image
$ sudo longtea list -c   # list all container

TODO

It need to implement the following features. It will be implemented on version 0.2.0.

  • Implement the network namespace
  • Implement the background run
  • Implement the Squlite DB connection to manage the container

longtea's People

Contributors

chungjung-d avatar

Stargazers

 avatar  avatar

Watchers

 avatar

longtea's Issues

[refactor] Refactoring code

  • Migration syscall to "golang.org/x/sys/unix"
  • Add Pre Run E on every command
  • Add ctx on every command
  • Del the global variable to inject ctx

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.