Giter Site home page Giter Site logo

package-builder's Introduction

Design Goals

  • Separation between packaing building and image creation
  • Making package information open to users
  • Automation

Package Repository

https://packagecloud.io/circleci/circleci

How to use

To build a new package, you first need to create directories and Dockerfiles.

Ex. python

./python
  src/
    Dockerfile
  test/
    Dockerfile

The src/Dockerfile is used to build a package. Optionally you can create test/Dockerfile to install the built package to do some testings.

Here is an example for src/Dockerfile to create ruby package.

ruby/src/Dockerfile

####### Don't change these lines!!
FROM circleci/ubuntu-server
ARG version
ARG prefix
ARG package
RUN apt-get update
RUN apt-get -y install ruby-dev build-essential git
RUN gem install fpm
RUN mkdir -p ${prefix}/${package}/${version}

####### Dependencies and config options to build a particular package
ENV deps "autoconf bison libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev zlib1g-dev"
ENV RUBY_CONFIGURE_OPTS "--disable-install-doc"

RUN apt-get -y install $deps

####### Actual commands for build. In ruby, we are using ruby-build and python-build for python and so on.
####### If no such **-build exists, you can install from source.
RUN git clone https://github.com/rbenv/ruby-build.git && cd ruby-build && ./install.sh

RUN ruby-build ${version} ${prefix}/${package}/${version}

####### You can install some nice-to-have things here
RUN ${prefix}/${package}/${version}/bin/gem install bundler

####### Packaging with fpm
RUN fpm -s dir -t deb -C ${prefix}/${package}/${version} \
      --name circleci-${package}${version} \
      --version 0.0.1 \
      --prefix ${prefix}/${package}/${version} \
      --force \
      --description "Ruby ${version} built by CircleCI"  \
      $(echo $deps | sed 's/^/ /' | sed 's/ / -d /g') \
      .

Once you created src/Dockerfile, you can run build-package script from the top directory.

./build-package ruby 2.2.2

package-builder's People

Contributors

yangkookkim avatar kimh avatar

Watchers

 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.