GithubHelp home page GithubHelp logo

docker-busybox's Introduction

Jpetazzo's Busybox Image Builders

A.k.a. "The Little Containers That Could!"

This repository contains:

  • a rootfs.tar archive suitable to build a minimal Docker image, based on Busybox;
  • a Dockerfile referencing this tarball, suitable for inclusion into Stackbrew;
  • multiple subdirectories providing Dockerfiles to build this tarball.

The goal of the latter is to solve a difficult question, id est "who builds the builders?".

Those meta-builders are called "tarmakers". They obey the following "API":

  • they are built with a Dockerfile themselves;
  • the Dockerfile doesn't use any local content (no ADD of local file);
  • they generate rootfs.tar in their root directory.

The script mkrootfs.sh is a helper to build rootfs.tar. It requires as first and only argument the name of a subdirectory containing a tarmaker.

The following tarmakers are available:

  • buildroot: uses the Buildroot toolchain to compile everything from scratch (WARNING: THIS IS SLOW, it takes half an hour on my quad-core laptop with badass SSDs, so it will probably take a few hours in a typical VM!)
  • ubuntu: installs the busybox-static Ubuntu package and use it as the base for the newly built image. This is very fast but the resulting image is a bit bigger, because we have to slap a few fat greasy libraries on top of it. Would you like some fries with that?

To rebuild a busybox image using one tarmaker or the other...

# Use buildroot or ubuntu
TARMAKER=ubuntu
./mkrootfs.sh tarmaker-ubuntu
docker build -t busybox .
docker run -t -i busybox

docker-busybox's People

Contributors

dave-tucker avatar estesp avatar jpetazzo avatar omeid avatar tbg avatar tianon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-busybox's Issues

Enable httpd in busybox image

httpd is such an useful applet in busybox.

httpd
httpd [-ifv[v]] [-c CONFFILE] [-p [IP:]PORT] [-u USER[:GRP]] [-r REALM] [-h HOME] or httpd -d/-e/-m STRING

Listen for incoming HTTP requests

Options:

        -i              Inetd mode
        -f              Do not daemonize
        -v[v]           Verbose
        -c FILE         Configuration file (default httpd.conf)
        -p [IP:]PORT    Bind to ip:port (default *:80)
        -u USER[:GRP]   Set uid/gid after binding to port
        -r REALM        Authentication Realm for Basic Authentication
        -h HOME         Home directory (default .)
        -m STRING       MD5 crypt STRING
        -e STRING       HTML encode STRING
        -d STRING       URL decode STRING

From: http://www.busybox.net/downloads/BusyBox.html

Mistakenly opened it here : docker-library/official-images#783

BusyBox 1.23.1 (stable)

A new version of BusyBox was released today. If you could update to it, that'd be swell.

Thanks! 😉

Cannot run static golang binaries when building on arch linux

I just recently switched from using linux mint to arch linux as my host system.

The golang is built using

CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w' .

I'm using the same build files and everything, however once I build the image it cannot run the static binary. It results in a No such file or directory error.

Even if I run the image built on arch I cannot run it on another system as the error persists. I can build on debian, ubuntu and it works properly.

$ sudo docker info
Containers: 20
Images: 255
Storage Driver: devicemapper
  Pool Name: docker-8:7-4458443-pool
  Pool Blocksize: 65.54 kB
  Backing Filesystem: extfs
  Data file; /dev/loop1
  Metadata file: /dev/loop1
  Data Space Used: 5.341 GB
  Data Space Total: 107.4 GB
  Metadata Space Used: 10.78 MB
  Metadata Space Total: 2.147 GB
  Udev Sync Supported: true
  Data loop file: /var/lib/docker/devicemapper/devicemapper/data
  Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
  Library Version: 1.02.93 (2015-01-30)
Execution Driver: native-0.2
Kernel Version: 3.18.6-1-ARCH
Operating System: Arch Linux
CPUs: 4
Total Memory: 7.509 GiB
Name: moosilauke
ID: FR3R:2GHU:5SWC:6IP4:YV5Q:MNDD:6TJX:AGDE:QG6R:LYX0:PRCD:P2ZE
WARNING: No swap limit support

Image does not correctly implement init system

In an ideal situation, PID 1 should be an init system rather than /bin/sh as presently found in the image.

Busybox has an integrated init system (/bin/init) that is suitable, so modifications should be made to reflect this. Alternatively, a system such as runit could be used as seen in baseimage-docker.

ip addr segfault

user@host ~ $ docker run --rm -i -t busybox:latest  /bin/sh
/ # ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
Segmentation fault
/ # 

Running on CoreOS 353, Docker 1.0

invalid tar magic with some .tar.gz files

Using this docker image I encount a problem when attempting to install GNU Make on it.

I'm not familiar with busybox and so, but I think it could be possible to install GNU Make.

So what I do is:

wget http://ftp.gnu.org/gnu/make/make-4.0.tar.gz
gunzip -c make-4.0.tar.gz |tar xvf -

As I use wget, gunzip and tar, I don't know if the problem comes from gunzip, tar or wget…

Have you any clue about this?

Thanks in advance.

Difficult time running java

Seems like a few symlinks or something of that nature would make it easier to run openjdk/oracle jdk/jre.

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.