Coder Social home page Coder Social logo

digitaloptimizationgroup / dockerize Goto Github PK

View Code? Open in Web Editor NEW

This project forked from larsks/dockerize

0.0 3.0 0.0 56 KB

A tool for creating minimal docker images from dynamic ELF binaries.

License: GNU General Public License v3.0

Python 100.00%

dockerize's Introduction

Dockerize

Dockerize will pack up your dynamically linked ELF binaries and all their dependencies and turn them into a Docker image.

Some example images built with this tool are available from:

Synopsis

usage: dockerize [-h] [--tag TAG] [--cmd CMD] [--entrypoint ENTRYPOINT]
                 [--no-build] [--output-dir OUTPUT_DIR] [--add-file SRC DST]
                 [--symlinks SYMLINKS] [--user USER] [--group GROUP]
                 [--filetools] [--verbose] [--debug] [--version]
                 ...

positional arguments:
  paths

optional arguments:
  -h, --help            show this help message and exit
  --add-file SRC DST, -a SRC DST
                        Add file <src> to image at <dst>
  --symlinks SYMLINKS, -L SYMLINKS
                        One of preserve, copy-unsafe, skip-unsafe, copy-all
  --user USER, -u USER  Add user to /etc/passwd in image
  --group GROUP, -g GROUP
                        Add group to /etc/group in image
  --filetools           Add common file manipulation tools
  --version             show program's version number and exit

Docker options:
  --tag TAG, -t TAG     Tag to apply to Docker image
  --cmd CMD, -c CMD
  --entrypoint ENTRYPOINT, -e ENTRYPOINT

Output options:
  --no-build, -n        Do not build Docker image
  --output-dir OUTPUT_DIR, -o OUTPUT_DIR

Logging options:
  --verbose
  --debug

A simple example

Create a sed image:

dockerize -t sed /bin/sed

Use it:

$ echo hello world | docker run -i sed s/world/jupiter
hello jupiter

A more complicated example

Create an image named thttpd:

dockerize -t thttpd \
  -a /var/www/thttpd /var/www \
  --entrypoint '/usr/sbin/thttpd -D' \
  --cmd '-d /var/www' \
  /usr/sbin/thttpd

Serve default content:

docker run thttpd

Serve your own content:

docker run -v /my/content:/var/www thttpd

dockerize's People

Contributors

brbsix avatar larsks avatar renzok avatar

Watchers

 avatar  avatar  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.