Giter VIP home page Giter VIP logo

docker-ruby-build's Introduction

build ruby debs in a docker container

  1. Make sure to update build.sh to add/remove the correct --conflicts and --replaces lines.
  2. Set the RUBY_PKG_ITERATION and RUBY_PKG_MAINTAINER environment variables for your build.
  3. Build the container(s) for the ubuntu release you want the ruby package to be build on.
# build the containers
docker build -t adamvduke/docker-ruby-build:precise -f Dockerfile.precise .
docker build -t adamvduke/docker-ruby-build:trusty -f Dockerfile.trusty .

# build the default 2.3.0 ruby and output the debs
docker run -it --rm -v /path/to/host/output/directory:/tmp/ruby-build/dist adamvduke/docker-ruby-build:precise
docker run -it --rm -v /path/to/host/output/directory:/tmp/ruby-build/dist adamvduke/docker-ruby-build:trusty

# override the environment variables to build ruby 2.2.2 and outut the debs
docker run -it --rm -v /path/to/host/output/directory:/tmp/ruby-build/dist \
-e "RUBY_PKG_VERSION=2.2" \
-e "RUBY_VERSION=2.2.2" \
adamvduke/docker-ruby-build:precise

docker run -it --rm -v /path/to/host/output/directory:/tmp/ruby-build/dist \
-e "RUBY_PKG_VERSION=2.2" \
-e "RUBY_VERSION=2.2.2" \
adamvduke/docker-ruby-build:trusty

# use dpkg --info to inspect the package that you built and make sure it looks correct
docker run -it --rm -v ~/tmp/precise/dist:/tmp/ruby-build/dist adamvduke/docker-ruby-build:precise bash
root@4ca002d5435b:/# dpkg --info /tmp/ruby-build/dist/ruby2.3_2.3.0-2_amd64.deb
 new debian package, version 2.0.
 size 32744464 bytes: control archive= 36418 bytes.
     559 bytes,    15 lines      control
  106372 bytes,  1244 lines      md5sums
 Package: ruby2.3
 Version: 2.3.0-2
 License: 2-clause BSDL
 Vendor: ruby
 Architecture: amd64
 Maintainer: [email protected]
 Installed-Size: 114330
 Depends: libc6 (>= 2.6), libffi6 (>= 3.0.10), libgdbm3 (>= 1.8.3), libncurses5 (>= 5.7), libreadline6 (>= 6.1), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.4.3), libyaml-0-2 (>= 0.1.3), zlib1g (>= 1:1.2.2)
 Conflicts: ruby1.9.1, ruby1.9.3, ruby2.1
 Provides: ruby, ruby-interpreter
 Replaces: ruby1.9.1, ruby1.9.3, ruby2.1
 Section: default
 Priority: extra
 Homepage: https://ruby-lang.org
 Description: Ruby 2.3.0 stable

docker run -it --rm -v ~/tmp/trusty/dist:/tmp/ruby-build/dist adamvduke/docker-ruby-build:trusty bash
root@74d487e05ac5:/# dpkg --info /tmp/ruby-build/dist/ruby2.3_2.3.0-2_amd64.deb
 new debian package, version 2.0.
 size 30693586 bytes: control archive=36422 bytes.
     559 bytes,    15 lines      control
  106372 bytes,  1244 lines      md5sums
 Package: ruby2.3
 Version: 2.3.0-2
 License: 2-clause BSDL
 Vendor: ruby
 Architecture: amd64
 Maintainer: [email protected]
 Installed-Size: 102406
 Depends: libc6 (>= 2.6), libffi6 (>= 3.0.10), libgdbm3 (>= 1.8.3), libncurses5 (>= 5.7), libreadline6 (>= 6.1), libssl1.0.0 (>= 1.0.0), libstdc++6 (>= 4.4.3), libyaml-0-2 (>= 0.1.3), zlib1g (>= 1:1.2.2)
 Conflicts: ruby1.9.1, ruby1.9.3, ruby2.1
 Provides: ruby, ruby-interpreter
 Replaces: ruby1.9.1, ruby1.9.3, ruby2.1
 Section: default
 Priority: extra
 Homepage: https://ruby-lang.org
 Description: Ruby 2.3.0 stable

docker-ruby-build's People

Contributors

adamvduke avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

snatchev

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.