Git Product home page Git Product logo

xbuild's Introduction

xbuild

Language runtimes installer for production environments.

Supports:

  • Perl
  • Ruby
  • Node.js
  • PHP
  • Python
  • Go

How to install

Install perl (ex: 5.18.2) (and cpanm/carton/start_server)

xbuild/perl-install 5.18.2 ~/local/perl-5.18

Install ruby (ex: 2.6.0) (and bundler)

xbuild/ruby-install 2.6.0 ~/local/ruby-2.6

Install node.js (ex: v0.10.26)

xbuild/node-install v0.10.26 ~/local/node-v0.10

Install PHP (ex: 5.5.10)

xbuild/php-install 5.5.10 ~/local/php-5.5.10
# with some build options
xbuild/php-install 5.5.10 ~/local/php-5.5.10 -- --with-pear --without-openssl

Install Python (ex: 2.7.6)

xbuild/python-install 2.7.6 ~/local/python-2.7.6

Install Go (ex: 1.3.3)

xbuild/go-install 1.3.3 ~/local/go-1.3.3

To update minor version, overwrite simply.

xbuild/node-install v0.10.25 ~/local/node-v0.10
xbuild/node-install v0.10.26 ~/local/node-v0.10

local/node-v0.10/bin/node -v #=> v0.10.26
#
# same for other languages as node.

Or, you can use install command simply.

# xbuild/install LANG VERSION PATH [OPTIONS]
#
xbuild/install ruby 2.6.0 ~/local/ruby-2.6

Replayable installation

xbuild checks specified install path before actual installation, and skips it if specified version runtime already exists.

For force re-install, use -f option.

xbuild/ruby-install -f 2.6.0 ~/local/ruby-2.6

How to use

Include installed bin/ to PATH:

# perl
export PATH=$HOME/local/perl-5.18/bin:$PATH
cpanm -Lextlib -n --installdeps .
# or carton install (or ...)

# ruby
export PATH=$HOME/local/ruby-2.6/bin:$PATH
bundle install --path vendor

# node
export PATH=$HOME/local/node-v0.10/bin:$PATH
npm install

# php
export PATH=$HOME/local/php-5.5.10/bin:$PATH
pear install

# python
export PATH=$HOME/local/python-2.7.6/bin:$PATH
pip install -r requirements.txt

# go
export GOROOT=$HOME/local/go-1.3.3
export PATH=$GOROOT/bin:$PATH
go version

How to try with Docker

You should be install Docker.

$ docker build -t xbuild-try .
$ docker run --rm -i -t xbuild-try /bin/bash
in docker > $ xbuild-install ruby 2.6.0 /usr/local/ruby-2.6.0

Contributors

Copyright

  • Copyright (c) 2013- TAGOMORI Satoshi (tagomoris)
    • and contributors
  • License
    • Apache License, Version 2.0 (see LICENSE)

xbuild's People

Contributors

tagomoris avatar srockstyle avatar kentaro avatar rosylilly avatar syohex avatar hfm avatar walf443 avatar matsumana avatar kazeburo avatar sgotand avatar yteraoka avatar yano3 avatar tokuhirom avatar harukasan avatar itchyny avatar lamanotrama avatar shirou avatar shrkw avatar tarao avatar

Stargazers

tsuzuki-takaaki avatar  avatar  avatar kcz avatar Hiroyuki Matsuo avatar kuntao avatar HAYASHI Ryo avatar Matt Mueller avatar  avatar Zhao Xiaohong avatar HirokiYoshida avatar Yoshi avatar  avatar Katsuya Miyachi avatar Masayuki Higashino avatar Shia avatar Masato Ohba avatar Keichi Takahashi avatar  avatar gomi_ningen avatar Kentaro Matsumoto avatar odanado avatar mado avatar Ken avatar  avatar Yuki Mukasa ( a_r_g_v ) avatar Yuji Iwai avatar  avatar Ian Chen avatar Isao Kono avatar  avatar tsmsogn avatar Markus Binsteiner avatar Gaku Kunimi avatar Toshiya SAITOH avatar Ruins avatar Noda Shimpei avatar  avatar Ryo Nakao avatar hogashi avatar Adrien Rigobello avatar Takayuki Yokoyama avatar  avatar Masato Sugiyama avatar kyontan avatar Junki Kaneko avatar  avatar bells17 avatar Shun Nishitsuji  avatar  avatar Kenjo Yasui avatar Okada Haruki avatar Toshinori Sato avatar pinkumohikan avatar Everton Yoshitani avatar Masaki Komagata avatar Fumitaka Yamane avatar JP Denford avatar Arun S Kumar avatar yuta.suzuki avatar NAKAMURA, Tomohiro avatar  avatar  avatar abcang avatar Masafumi Noguchi avatar Pine Mizune avatar Zsolt Tripolszky avatar Kazuya Takeshima avatar tkmknr avatar Masaki ISHIYAMA avatar Yuki Kodama avatar Hironori Ogibayashi avatar NoScripter avatar NANBA Toshiaki avatar Kenta Long Yamamoto avatar Nobutaka WAKABAYASHI avatar Angus H. avatar Yoshio Kakehashi avatar yowatari avatar Kosuke Komiya avatar maruware avatar Norihiro Ide avatar sasaplus1 avatar  avatar Koji Narazaki avatar Tetsuya HAMAMOTO avatar saxsir avatar Hikari Tsuchiya avatar j5a avatar Yutaro IHARA avatar David Martin avatar Sorami Hisamoto avatar  avatar Yuji Takaesu avatar Yuichi Murata avatar mapyo avatar aero avatar YAMADA Tsuyoshi avatar Manabu Sakai avatar Ryota Yoshikawa avatar

Watchers

TANIGUCHI Hikaru avatar Tatsuru WATANABE avatar  avatar Everton Yoshitani avatar James Cloos avatar dai_yamashita avatar cyrill avatar  avatar

xbuild's Issues

How Could I use this scrit behind proxy ?

Could I use this behind proxy ?
I tried install ruby using this.
but failed download its tar archive.
with nothing special error log.

what I assume is that it my proxy environment affect this.

node-install: How about switching the default architecture automatically?

Hi, tagomoris. Thanks for maintaining useful scripts.

We use node-install in our Dockerfile. As some of the team have M1 Mac and others have Intel Mac, and x64 emulation of Docker Desktop does not work in many images, we need the following code to selecting the architecture automatically.

RUN if [ "x$(arch)" = "xaarch64" ]; then ARCH="linux-arm64"; else ARCH="linux-x64"; fi \
    && /usr/local/xbuild/node-install v${NODE_VERSION} /xbuild/node-${NODE_VERSION} $ARCH

Otherwise, node-install will fail with

++ dirname /usr/local/xbuild/node-install
+ cd /usr/local/xbuild
+ '[' x = x -a -d /xbuild/node-14.15.0 -a -x /xbuild/node-14.15.0/bin/node ']'
++ /xbuild/node-14.15.0/bin/node -v
/lib64/ld-linux-x86-64.so.2: No such file or directory

I understand the proper way to the solution is switching the architectures like the above code, growing number of Dockerfile fails to build on node-install script as M1 Mac gets popularity. So my suggestion here is, how about selecting the linux-arm64 architecture based on $(arch)?

I also understand making the script working well on any combination of OS (darwin/linux) and architectures, and I don't think it worth putting effort to. However, choosing whether linux-arm64 or linux-x64 will help various projects without fixing their Dockerfiles.

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.