Giter Site home page Giter Site logo

cup's Introduction

CUP

Build Status codecov

cup is a container :)

Set it up

  • clone this repo:
$ git clone https://github.com/jiajunhuang/cup
$ cd cup
  • prepare rootfs & command
$ # download busybox binary in: https://busybox.net/downloads/binaries/1.21.1/
$ wget https://busybox.net/downloads/binaries/1.21.1/busybox-x86_64 -o busybox
$ mkdir -p rootfs/{bin,proc}
$ mv busybox rootfs/bin/
  • change rootfs's owner to root:root(because we're gonna run cup in root)
$ sudo chown -R root:root rootfs/
  • compile cup and spawn it!
$ make && sudo ./cup
go fmt ./...
go vet -v .
github.com/jiajunhuang/cup
# github.com/jiajunhuang/cup
Checking file ./main.go
go test -cover  -race   ./...
?       github.com/jiajunhuang/cup      [no test files]
go build -o cup
2018/03/09 10:15:47 main start...
2018/03/09 10:15:48 childProcess start...uid: 0, gid: 0
2018/03/09 10:15:48 child: hostname: idea
2018/03/09 10:15:48 child: hostname: cup-host
/ # busybox ps
PID   USER     TIME   COMMAND
    1 0          0:00 {exe} childProcess
    6 0          0:00 /bin/busybox sh
    7 0          0:00 busybox ps
/ # busybox cat /proc/self/mounts
/proc /proc proc rw,relatime 0 0
/ # busybox id
uid=0 gid=0 groups=0,65534,65534,65534,65534,65534,65534,65534
/ # exit
2018/03/09 10:16:17 main: hostname: idea

cup's People

Contributors

jiajunhuang avatar

Watchers

James Cloos avatar

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.