Created
October 5, 2017 15:41
-
-
Save iros/44f61c456f7a61964bfc7c8c0c474db3 to your computer and use it in GitHub Desktop.
Travis dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openjdk:8 | |
RUN wget http://apache.claz.org/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | |
RUN tar zxvf apache-maven-3.3.9-bin.tar.gz | |
RUN chmod +x apache-maven-3.3.9/bin/mvn | |
RUN export M2_HOME=$PWD/apache-maven-3.3.9 | |
RUN export PATH=$PWD/apache-maven-3.3.9/bin:${PATH} | |
RUN apt-get update | |
RUN apt-get install -y software-properties-common | |
RUN apt-get install -y nginx openssh-server git-core openssh-client curl | |
RUN apt-get install -y nano | |
RUN apt-get install -y build-essential | |
RUN apt-get install -y openssl zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison pkg-config | |
RUN useradd -ms /bin/bash travis | |
RUN adduser travis sudo | |
USER travis | |
WORKDIR /home/travis | |
FROM tzenderman/docker-rvm:latest | |
RUN /bin/bash -lc "rvm install 2.3.4" | |
RUN /bin/bash -lc "rvm use ruby-2.3.4" | |
RUN apt-get update | |
RUN apt-get install -y --fix-missing git | |
WORKDIR ~/builds | |
RUN git clone https://github.com/travis-ci/travis-build.git | |
WORKDIR travis-build | |
RUN /bin/bash -lc "rvm rubygems 2.6.13" | |
RUN /bin/bash -lc "gem install travis" | |
RUN /bin/bash -lc "echo 'y' | travis" | |
RUN ln -s $(pwd) ~/.travis/travis-build | |
RUN /bin/bash -lc "gem install bundler" | |
RUN /bin/bash -lc "bundle install" | |
RUN /bin/bash -lc "bundler add travis" | |
WORKDIR ~/.travis/travis-build/ | |
RUN mkdir ~/.travis/travis-build/bin | |
RUN chmod a+w ~/.travis/travis-build/bin | |
RUN /bin/bash -lc "gem install rake -v 12.0.0 --no-ri --no-rdoc" | |
RUN /bin/bash -lc "bundler binstubs travis" | |
CMD /bin/bash -lc "cd /pipeline && \ | |
rvm use ruby-2.3.4 && \ | |
~/.travis/travis-build/bin/travis compile --no-interactive > ci.sh && \ | |
chmod 700 ci.sh && \ | |
./ci.sh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment