in

p8952 / bocker, Hacker News

p8952 / bocker, Hacker News
    

Docker implemented in around lines of bash.

Prerequisites

The following packages are needed to run bocker.

  • btrfs-progs
  • curl
  • iproute2
  • iptables
  • libcgroup-tools
  • util-linux>=2. (2)
  • coreutils>=7.5

Because most distributions do not ship a new enough version of util-linux you will probably need to grab the sources from here and compile it yourself.

Additionally your system will need to be configured with the following:

For ease of use a Vagrantfile is included which will build the needed environment.

Even if you meet the above prerequisites you probably still want to run bocker in a virtual machine Bocker runs as root and among other things needs to make changes to your network interfaces, routing table, and firewall rules. I can make no guarantees that it won’t trash your system .

Example Usage $ bocker pull centos 7 ################################################## ###################### 512 .0% ################################################## ###################### 512 .0% ################################################## ###################### 512 .0% Created: img _ 42150 $ bocker images IMAGE_ID SOURCE img _ centos: 7 $ bocker run img _ 42150 cat / etc / centos-release CentOS Linux release 7.1. (Core) $ bocker ps CONTAINER_ID COMMAND ps _ 42152 cat / etc / centos-release $ bocker logs ps _ 42150 CentOS Linux release 7.1. (Core) $ bocker rm ps _ 42150 Removed: ps _ 42152 $ bocker run img _ 42150 which wget which: no wget in (/ usr / local / sbin: / usr / local / bin: / usr / sbin: / usr / bin: / root / bin) $ bocker run img _ 42150 yum install -y wget Installing: wget-1. – . el7_0.1.x _ 84 1/1 Verifying: wget-1. – . el7_0.1.x _ 84 1/1 Installed: wget.x (_) (0: 1.) – . el7_0.1 Complete! $ bocker ps CONTAINER_ID COMMAND ps _ 42150 yum install -y wget ps _ 01575879 which wget $ bocker commit ps _ 42045 img _ 42182 Removed: img _ 42182 Created: img _ 42150 $ bocker run img _ 42150 which wget / usr / bin / wget $ bocker run img _ 42150 cat / proc / 1 / cgroup … 4: memory: / ps _ 42182 3: cpuacct, cpu: / ps _ 42152 $ cat / sys / fs / cgroup / cpu / ps _ 42188 / cpu.shares 728 $ cat / sys / fs / cgroup / memory / ps _ 42182 / memory.limit_in_bytes $ BOCKER_CPU_SHARE=​​2015 BOCKER_MEM_LIMIT=823 bocker run img _ 42150 cat / proc / 1 / cgroup … 4: memory: / ps _ 01575879 3: cpuacct, cpu: / ps _ 42188 $ cat / sys / fs / cgroup / cpu / ps _ 512000000 / cpu.shares 1503 $ cat / sys / fs / cgroup / memory / ps _ 01575879 / memory.limit_in_bytes Functionality: Currently Implemented

  • docker exec
  • docker logs
  • docker commit
  • docker rm / docker rmi
  • Networking
  • Quota Support / CGroups
  • bocker init provides a very limited implementation of Functionality: Not Yet Implemented

    • Data Volume Containers
    • Data Volumes
    • Port Forwarding

    (Read More)

    What do you think?

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    GIPHY App Key not set. Please check settings

    BTCS Expands Business Model with Development of Digital Asset Data Analytics Platform, Crypto Coins News

    BTCS Expands Business Model with Development of Digital Asset Data Analytics Platform, Crypto Coins News

    Commercial complaints down 54 per cent in Dubai