Skip to content

Instantly share code, notes, and snippets.

@iros iros/Dockerfile
Created Oct 5, 2017

Embed
What would you like to do?
Travis dockerfile
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
You can’t perform that action at this time.