Giter Club home page Giter Club logo

makedpm's Introduction

Docker-Makepkg

This is a tool and docker image for building packages in a docker container. The resulting package is placed in the directory the tool was called from.

Usage

The included dmakepkg.py script wraps calling of docker run and the necessary arguments. It has several arguments that can be passed.

bin/dmakepkg.py -h
usage: dmakepkg [-h] [-x] [-y] [-z] [-e [E]] ...

positional arguments:
  rest        The arguments that are passed to the call to pacman in its
              executions in the container. They default to "--nosign --force
              --syncdeps --noconfirm".

optional arguments:
  -h, --help  show this help message and exit
  -x          Use host system's /etc/pacman.conf
  -y          Never use pump mode, even if pump mode capable servers are
              configured
  -z          Do not automatically download missing PGP keys
  -e [E]      Executes the argument as a command in the container after
              copying the package source

Using the tool could look like this:

$ git clone https://example.comf/project.git
$ cd project
$ dmakepkg

Description of the arguments

  • rest: The rest of the arguments that are not known to the script. They are passed through to the docker container's makepkg call.

  • -h, --help: Display the help message

  • -x: Pass in the host's pacman.conf into the docker image.

  • -y: Force disabling of pump mode. By default, distcc pump mode is used to accelerate the compiling of code.

  • -z: Do not download missing PGP keys. By default, the downloading of missing PGP keys is enabled.

  • -e [E]: This executes the passed string as command in the container after copying of the package source. This can be used to, for example, install prerequired packages or perform arbitrary actions in the container.

The docker image

The docker image that is used to build must be built prior to calling the script. The image is built using the containerBuilder.py script that is started by the packaged systemd service. The associated timer unit thus builds the image 15 minutes after the system was booted and every day. During the building of the image, a darkhttpd based cache is used to accelerate the download of the packages. This is implemented by starting darkhttpd on the IP address of the docker0 device and installing of an iptables rule that permits connections to that address and the port of darkhttpd. After the tool has finished building, the iptables rules are removed and darkhttpd is stopped.

makedpm's People

Contributors

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