Skip to content

Commit

Permalink
Land #85, refresh docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
busterb committed Jan 8, 2019
2 parents 30a19be + 90eb2ce commit c65bd4f
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
@@ -1 +1 @@
2.4.4
2.5.3
45 changes: 28 additions & 17 deletions docker/kali109_32-omnibus/Dockerfile
Expand Up @@ -3,11 +3,13 @@
FROM rapid7/build:kali109_32
MAINTAINER Rapid7 Release Engineering <r7_re@rapid7.com>

RUN echo "deb http://old.kali.org/kali moto main non-free contrib" > /etc/apt/sources.list

RUN rm -fr /var/lib/apt/lists && \
apt-get update && \
apt-get install -y --force-yes kali-archive-keyring && \
apt-get update && \
apt-get install -y \
apt-get install -y --force-yes \
curl \
binutils-doc \
flex \
Expand Down Expand Up @@ -37,22 +39,31 @@ RUN echo "jenkins ALL=NOPASSWD: ALL" > /etc/sudoers.d/jenkins
RUN chmod 440 /etc/sudoers.d/jenkins
RUN apt-get remove -y libpq-dev libpq5

RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import -
RUN curl -sSL https://get.rvm.io | bash -s stable
RUN /bin/bash -l -c "rvm requirements"
RUN /bin/bash -l -c "rvm install 2.1"
RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
RUN su jenkins -c 'command curl -sSL https://rvm.io/mpapis.asc | gpg --import - && \
command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - && \
curl -L -sSL https://get.rvm.io | bash -s stable'

RUN curl -O http://ftp.gnu.org/gnu/gawk/gawk-4.2.1.tar.gz && \
tar zxf gawk-4.2.1.tar.gz && \
cd gawk-4.2.1 && \
./configure && \
make && make install && \
cd ../ && rm -rf gawk-4.2.1*

RUN curl -O ftp://ftp.tcl.tk/pub/tcl/tcl8_6/tcl8.6.9-src.tar.gz && \
tar zxf tcl8.6.9-src.tar.gz && \
cd tcl8.6.9/unix && \
./configure && make && make install && \
cd ../../ && rm -rf tcl8.6.9*

RUN curl -O https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release && \
tar zxf sqlite.tar.gz?r=release && \
mkdir bld && cd bld && ../sqlite/configure && \
make && make install && \
cd ../ && rm -rf sqlite* && rm -rf bld

# pre-load the omnibus dependencies
RUN git clone https://github.com/rapid7/metasploit-omnibus.git
RUN /bin/bash -l -c "cd metasploit-omnibus && bundle install --binstubs"
RUN rm -fr metasploit-omnibus
RUN mkdir /metasploit-framework
RUN /usr/bin/sudo rm -rf $HOME/.rvm $HOME/.rvmrc /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm /usr/local/bin/rvm && \
/usr/bin/sudo /usr/sbin/groupdel rvm
RUN su jenkins -c "/bin/bash -l -c 'curl -sSL https://rvm.io/mpapis.asc | gpg --import -'"
RUN su jenkins -c "/bin/bash -l -c 'curl -sSL https://get.rvm.io | bash -s stable'"
RUN su jenkins -c "/bin/bash -l -c 'rvm install 2.4.1'"
RUN su jenkins -c "/bin/bash -l -c 'rvm use 2.4.1 && gem install bundler --no-ri --no-rdoc'"
RUN su jenkins -c "/bin/bash -l -c 'rvm use 2.4.1 && cd ~/ && git clone https://github.com/rapid7/metasploit-omnibus.git && \
RUN su jenkins -c "/bin/bash -l -c 'rvm install 2.5.3 --autolibs=0'"
RUN su jenkins -c "/bin/bash -l -c 'rvm use 2.5.3 && gem install bundler --no-ri --no-rdoc'"
RUN su jenkins -c "/bin/bash -l -c 'rvm use 2.5.3 && cd ~/ && git clone https://github.com/rapid7/metasploit-omnibus.git && \
cd metasploit-omnibus && bundle install --binstubs && cd .. && rm -rf metasploit-omnibus'"
45 changes: 28 additions & 17 deletions docker/kali109_64-omnibus/Dockerfile
Expand Up @@ -3,11 +3,13 @@
FROM rapid7/build:kali109_64
MAINTAINER Rapid7 Release Engineering <r7_re@rapid7.com>

RUN echo "deb http://old.kali.org/kali moto main non-free contrib" > /etc/apt/sources.list

RUN rm -fr /var/lib/apt/lists && \
apt-get update && \
apt-get install -y --force-yes kali-archive-keyring && \
apt-get update && \
apt-get install -y \
apt-get install -y --force-yes \
curl \
binutils-doc \
flex \
Expand Down Expand Up @@ -37,22 +39,31 @@ RUN echo "jenkins ALL=NOPASSWD: ALL" > /etc/sudoers.d/jenkins
RUN chmod 440 /etc/sudoers.d/jenkins
RUN apt-get remove -y libpq-dev libpq5

RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import -
RUN curl -sSL https://get.rvm.io | bash -s stable
RUN /bin/bash -l -c "rvm requirements"
RUN /bin/bash -l -c "rvm install 2.1"
RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
RUN su jenkins -c 'command curl -sSL https://rvm.io/mpapis.asc | gpg --import - && \
command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - && \
curl -L -sSL https://get.rvm.io | bash -s stable'

RUN curl -O http://ftp.gnu.org/gnu/gawk/gawk-4.2.1.tar.gz && \
tar zxf gawk-4.2.1.tar.gz && \
cd gawk-4.2.1 && \
./configure && \
make && make install && \
cd ../ && rm -rf gawk-4.2.1*

RUN curl -O ftp://ftp.tcl.tk/pub/tcl/tcl8_6/tcl8.6.9-src.tar.gz && \
tar zxf tcl8.6.9-src.tar.gz && \
cd tcl8.6.9/unix && \
./configure && make && make install && \
cd ../../ && rm -rf tcl8.6.9*

RUN curl -O https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release && \
tar zxf sqlite.tar.gz?r=release && \
mkdir bld && cd bld && ../sqlite/configure && \
make && make install && \
cd ../ && rm -rf sqlite* && rm -rf bld

# pre-load the omnibus dependencies
RUN git clone https://github.com/rapid7/metasploit-omnibus.git
RUN /bin/bash -l -c "cd metasploit-omnibus && bundle install --binstubs"
RUN rm -fr metasploit-omnibus
RUN mkdir /metasploit-framework
RUN /usr/bin/sudo rm -rf $HOME/.rvm $HOME/.rvmrc /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm /usr/local/bin/rvm && \
/usr/bin/sudo /usr/sbin/groupdel rvm
RUN su jenkins -c "/bin/bash -l -c 'curl -sSL https://rvm.io/mpapis.asc | gpg --import -'"
RUN su jenkins -c "/bin/bash -l -c 'curl -sSL https://get.rvm.io | bash -s stable'"
RUN su jenkins -c "/bin/bash -l -c 'rvm install 2.4.1'"
RUN su jenkins -c "/bin/bash -l -c 'rvm use 2.4.1 && gem install bundler --no-ri --no-rdoc'"
RUN su jenkins -c "/bin/bash -l -c 'rvm use 2.4.1 && cd ~/ && git clone https://github.com/rapid7/metasploit-omnibus.git && \
RUN su jenkins -c "/bin/bash -l -c 'rvm install 2.5.3 --autolibs=0'"
RUN su jenkins -c "/bin/bash -l -c 'rvm use 2.5.3 && gem install bundler --no-ri --no-rdoc'"
RUN su jenkins -c "/bin/bash -l -c 'rvm use 2.5.3 && cd ~/ && git clone https://github.com/rapid7/metasploit-omnibus.git && \
cd metasploit-omnibus && bundle install --binstubs && cd .. && rm -rf metasploit-omnibus'"
54 changes: 54 additions & 0 deletions docker/ubuntu1204_32-omnibus/Dockerfile
@@ -0,0 +1,54 @@
# To build the dev environment.
# docker build -t rapid7/build:ubuntu1204_32-omnibus .
FROM i386/ubuntu:12.04
MAINTAINER Rapid7 Release Engineering <r7_re@rapid7.com>

RUN sed -i 's/archive\.ubuntu/old-releases\.ubuntu/g' /etc/apt/sources.list

RUN rm -fr /var/lib/apt/lists && \
apt-get update && \
apt-get install -y \
curl \
binutils-doc \
flex \
git \
ruby ruby-dev \
ccache \
fakeroot \
libreadline-dev \
libcurl4-openssl-dev \
libexpat1-dev \
libicu-dev \
reprepro \
sudo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN git config --global user.email "packager@example.com" && \
git config --global user.name "Omnibus Packager"

ENV JENKINS_HOME /home/jenkins
RUN useradd -d "$JENKINS_HOME" -u 1001 -m -s /bin/sh jenkins

RUN mkdir -p "$JENKINS_HOME" && \
cp ~/.gitconfig "$JENKINS_HOME" && \
chown -R jenkins "$JENKINS_HOME" && \
mkdir -p /var/cache/omnibus && \
mkdir -p /opt/metasploit-framework && \
chown jenkins /var/cache/omnibus && \
chown jenkins /opt/metasploit-framework
RUN mkdir -p /etc/sudoers.d
RUN echo "jenkins ALL=NOPASSWD: ALL" > /etc/sudoers.d/jenkins
RUN chmod 440 /etc/sudoers.d/jenkins

RUN su jenkins -c 'command curl -sSL https://rvm.io/mpapis.asc | gpg --import - && \
command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - && \
curl -L -sSL https://get.rvm.io | bash -s stable'

RUN su jenkins -c "/bin/bash -l -c 'rvm requirements'"
RUN su jenkins -c "linux32 /bin/bash -l -c 'rvm install 2.5.3'"
RUN su jenkins -c "linux32 /bin/bash -l -c 'gem install bundler --no-ri --no-rdoc'"

# pre-load the omnibus dependencies
RUN su jenkins -c "/bin/bash -l -c 'cd ~/ && git clone https://github.com/rapid7/metasploit-omnibus.git && \
cd ~/metasploit-omnibus && bundle install --binstubs && cd ~/ && rm -fr metasploit-omnibus'"
54 changes: 54 additions & 0 deletions docker/ubuntu1204_64-omnibus/Dockerfile
@@ -0,0 +1,54 @@
# To build the dev environment.
# docker build -t rapid7/build:ubuntu1204_64-omnibus .
FROM ubuntu:12.04.5
MAINTAINER Rapid7 Release Engineering <r7_re@rapid7.com>

RUN sed -i 's/archive\.ubuntu/old-releases\.ubuntu/g' /etc/apt/sources.list

RUN rm -fr /var/lib/apt/lists && \
apt-get update && \
apt-get install -y \
curl \
binutils-doc \
flex \
git \
ruby ruby-dev \
ccache \
fakeroot \
libreadline-dev \
libcurl4-openssl-dev \
libexpat1-dev \
libicu-dev \
reprepro \
sudo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN git config --global user.email "packager@example.com" && \
git config --global user.name "Omnibus Packager"

ENV JENKINS_HOME /home/jenkins
RUN useradd -d "$JENKINS_HOME" -u 1001 -m -s /bin/sh jenkins

RUN mkdir -p "$JENKINS_HOME" && \
cp ~/.gitconfig "$JENKINS_HOME" && \
chown -R jenkins "$JENKINS_HOME" && \
mkdir -p /var/cache/omnibus && \
mkdir -p /opt/metasploit-framework && \
chown jenkins /var/cache/omnibus && \
chown jenkins /opt/metasploit-framework
RUN mkdir -p /etc/sudoers.d
RUN echo "jenkins ALL=NOPASSWD: ALL" > /etc/sudoers.d/jenkins
RUN chmod 440 /etc/sudoers.d/jenkins

RUN su jenkins -c 'command curl -sSL https://rvm.io/mpapis.asc | gpg --import - && \
command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - && \
curl -L -sSL https://get.rvm.io | bash -s stable'

RUN su jenkins -c "/bin/bash -l -c 'rvm requirements'"
RUN su jenkins -c "/bin/bash -l -c 'rvm install 2.5.3'"
RUN su jenkins -c "/bin/bash -l -c 'gem install bundler --no-ri --no-rdoc'"

# pre-load the omnibus dependencies
RUN su jenkins -c "/bin/bash -l -c 'cd ~/ && git clone https://github.com/rapid7/metasploit-omnibus.git && \
cd ~/metasploit-omnibus && bundle install --binstubs && cd ~/ && rm -fr metasploit-omnibus'"

0 comments on commit c65bd4f

Please sign in to comment.