forked from msgpack/msgpack-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (48 loc) · 2.33 KB
/
Dockerfile
File metadata and controls
62 lines (48 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM ubuntu:14.04
MAINTAINER TAGOMORI Satoshi <[email protected]>
LABEL Description="Host image to cross-compile msgpack.gem for mingw32" Vendor="MessagePack Organization" Version="1.0"
RUN apt-get update -y && apt-get install -y \
git \
curl \
autoconf \
bison \
build-essential \
libssl-dev \
libyaml-dev \
libreadline6-dev \
zlib1g-dev \
libncurses5-dev \
libffi-dev \
libgdbm3 \
libgdbm-dev \
mingw-w64 \
gcc-mingw-w64-i686 \
gcc-mingw-w64-x86-64 \
&& rm -rf /var/lib/apt/lists/*
RUN useradd ubuntu -d /home/ubuntu -m -U
RUN chown -R ubuntu:ubuntu /home/ubuntu
USER ubuntu
WORKDIR /home/ubuntu
RUN git clone https://github.com/tagomoris/xbuild.git
RUN git clone https://github.com/msgpack/msgpack-ruby.git
RUN /home/ubuntu/xbuild/ruby-install 2.0.0-p643 /home/ubuntu/local/ruby-2.0
ENV PATH /home/ubuntu/local/ruby-2.0/bin:$PATH
RUN gem install rake-compiler
RUN rake-compiler cross-ruby VERSION=2.0.0-p643 HOST=x86-mingw32 EXTS=--without-extensions
RUN rake-compiler cross-ruby VERSION=2.0.0-p643 HOST=x64-mingw32 EXTS=--without-extensions
RUN /home/ubuntu/xbuild/ruby-install 2.1.5 /home/ubuntu/local/ruby-2.1
ENV PATH /home/ubuntu/local/ruby-2.1/bin:$PATH
RUN gem install rake-compiler
RUN rake-compiler cross-ruby VERSION=2.1.5 HOST=x86-mingw32 EXTS=--without-extensions
RUN rake-compiler cross-ruby VERSION=2.1.5 HOST=x64-mingw32 EXTS=--without-extensions
RUN /home/ubuntu/xbuild/ruby-install 2.2.2 /home/ubuntu/local/ruby-2.2
ENV PATH /home/ubuntu/local/ruby-2.2/bin:$PATH
RUN gem install rake-compiler
RUN rake-compiler cross-ruby VERSION=2.2.2 HOST=x86-mingw32 EXTS=--without-extensions
RUN rake-compiler cross-ruby VERSION=2.2.2 HOST=x64-mingw32 EXTS=--without-extensions
WORKDIR /home/ubuntu/msgpack-ruby
ENV MSGPACK_REPO https://github.com/msgpack/msgpack-ruby.git
ENV BUILD_BRANCH master
ENV BUILD_POSITION HEAD
### docker run -v `pwd`/pkg:/home/ubuntu/msgpack-ruby/pkg IMAGENAME
CMD ["bash", "-c", "git remote add dockerbuild $MSGPACK_REPO && git fetch dockerbuild && git checkout $BUILD_BRANCH && git pull dockerbuild $BUILD_BRANCH && git reset --hard $BUILD_POSITION && bundle && rake clean && rake cross native gem RUBY_CC_VERSION=2.0.0:2.1.5:2.2.2"]