https://github.com/p8952/bocker Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + By Plan + Enterprise + Teams + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} p8952 / bocker Public * Notifications * Fork 647 * Star 8.9k Docker implemented in around 100 lines of bash www.p8952.info/ License GPL-3.0 license 8.9k stars 647 forks Star Notifications * Code * Issues 6 * Pull requests 5 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights p8952/bocker This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 1 tag Code * Clone HTTPS GitHub CLI [https://github.com/p] Use Git or checkout with SVN using the web URL. [gh repo clone p8952/] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @p8952 p8952 Remove base-image requirement ... 0006330 Aug 12, 2015 Remove base-image requirement 0006330 Git stats * 77 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time tests Add input checks to exec; Make exec's grep more robust; Added tests f... Aug 5, 2015 .gitignore Improve test coverage Jul 23, 2015 LICENSE GPLv3 Jul 14, 2015 README.md Remove base-image requirement Aug 12, 2015 Vagrantfile Added libcgroup-tools to the list of packages to install Jul 31, 2015 bocker Remove unneeded whitespace Aug 5, 2015 test Improve test coverage Jul 23, 2015 View code Bocker Prerequisites Example Usage Functionality: Currently Implemented Functionality: Not Yet Implemented License README.md Bocker Docker implemented in around 100 lines of bash. * Prerequisites * Example Usage * Functionality: Currently Implemented * Functionality: Not Yet Implemented * License Prerequisites The following packages are needed to run bocker. * btrfs-progs * curl * iproute2 * iptables * libcgroup-tools * util-linux >= 2.25.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: * A btrfs filesystem mounted under /var/bocker * A network bridge called bridge0 and an IP of 10.0.0.1/24 * IP forwarding enabled in /proc/sys/net/ipv4/ip_forward * A firewall routing traffic from bridge0 to a physical interface. 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 ######################################################################## 100.0% ######################################################################## 100.0% ######################################################################## 100.0% Created: img_42150 $ bocker images IMAGE_ID SOURCE img_42150 centos:7 $ bocker run img_42150 cat /etc/centos-release CentOS Linux release 7.1.1503 (Core) $ bocker ps CONTAINER_ID COMMAND ps_42045 cat /etc/centos-release $ bocker logs ps_42045 CentOS Linux release 7.1.1503 (Core) $ bocker rm ps_42045 Removed: ps_42045 $ 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.14-10.el7_0.1.x86_64 1/1 Verifying : wget-1.14-10.el7_0.1.x86_64 1/1 Installed : wget.x86_64 0:1.14-10.el7_0.1 Complete! $ bocker ps CONTAINER_ID COMMAND ps_42018 yum install -y wget ps_42182 which wget $ bocker commit ps_42018 img_42150 Removed: img_42150 Created: img_42150 $ bocker run img_42150 which wget /usr/bin/wget $ bocker run img_42150 cat /proc/1/cgroup ... 4:memory:/ps_42152 3:cpuacct,cpu:/ps_42152 $ cat /sys/fs/cgroup/cpu/ps_42152/cpu.shares 512 $ cat /sys/fs/cgroup/memory/ps_42152/memory.limit_in_bytes 512000000 $ BOCKER_CPU_SHARE=1024 \ BOCKER_MEM_LIMIT=1024 \ bocker run img_42150 cat /proc/1/cgroup ... 4:memory:/ps_42188 3:cpuacct,cpu:/ps_42188 $ cat /sys/fs/cgroup/cpu/ps_42188/cpu.shares 1024 $ cat /sys/fs/cgroup/memory/ps_42188/memory.limit_in_bytes 1024000000 Functionality: Currently Implemented * docker build + * docker pull * docker images * docker ps * docker run * docker exec * docker logs * docker commit * docker rm / docker rmi * Networking * Quota Support / CGroups + bocker init provides a very limited implementation of docker build Functionality: Not Yet Implemented * Data Volume Containers * Data Volumes * Port Forwarding License Copyright (C) 2015 Peter Wilmott This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. About Docker implemented in around 100 lines of bash www.p8952.info/ Resources Readme License GPL-3.0 license Stars 8.9k stars Watchers 274 watching Forks 647 forks Releases 1 tags Packages 0 No packages published Contributors 9 * * * * * * * * * Languages * Shell 100.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.