Update Dockerfile to use latest Ubuntu, Node and r2pipe

This commit is contained in:
pancake 2016-11-07 15:34:22 +01:00
parent 679ab60501
commit 7217f1ab9e
2 changed files with 27 additions and 25 deletions

View file

@ -1,15 +1,10 @@
# r2docker
# ========
#
# Windows and OSX users must use boot2docker
#
# $ boot2docker init
# $ boot2docker start
# (.. wait a bit ..)
# copy paste the environment variables
#
# For everyone:
# Requires 1GB of free disk space
#
# Build docker image with:
# $ docker build .
# $ docker build -t r2docker .
#
# Run the docker image:
# $ docker images
@ -28,38 +23,48 @@
#
# using phusion/baseimage as base image.
FROM phusion/baseimage:0.9.9
FROM ubuntu
# Set correct environment variables.
ENV HOME /root
# Regenerate SSH host keys. baseimage-docker does not contain any
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
# RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
CMD ["/bin/bash"]
# create code directory
RUN mkdir -p /opt/code/
# install packages required to compile vala and radare2
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y software-properties-common python-all-dev wget
RUN apt-get install -y swig flex bison git gcc g++ make pkg-config glib-2.0
RUN apt-get install -y python-gobject-dev valgrind gdb
RUN apt-get install -y software-properties-common wget python curl
RUN apt-get install -y gcc git bison pkg-config make glib-2.0
#RUN apt-get install -y swig flex bison git gcc g++ make pkg-config glib-2.0
#RUN apt-get install -y swig flex bison git gcc g++ make pkg-config glib-2.0
#RUN apt-get install -y python-gobject-dev valgrind gdb
ENV VALA_TAR vala-0.26.1
#ENV VALA_TAR vala-0.32.1
# compile vala
RUN cd /opt/code && \
wget -c https://download.gnome.org/sources/vala/0.26/${VALA_TAR}.tar.xz && \
shasum ${VALA_TAR}.tar.xz | grep -q 0839891fa02ed2c96f0fa704ecff492ff9a9cd24 && \
tar -Jxf ${VALA_TAR}.tar.xz
RUN cd /opt/code/${VALA_TAR}; ./configure --prefix=/usr ; make && make install
#RUN cd /opt/code && \
## wget -c https://download.gnome.org/sources/vala/0.32/${VALA_TAR}.tar.xz && \
# shasum ${VALA_TAR}.tar.xz | grep -q 0839891fa02ed2c96f0fa704ecff492ff9a9cd24 && \
# tar -Jxf ${VALA_TAR}.tar.xz
#RUN cd /opt/code/${VALA_TAR}; ./configure --prefix=/usr ; make && make install
# compile radare and bindings
RUN cd /opt/code; git clone https://github.com/radare/radare2.git; cd radare2; ./sys/all.sh
# Python
RUN apt-get install -y python-pip ; pip install r2pipe
# NodeJS
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - ; apt-get install -y nodejs
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# build and install r2
RUN cd /opt/code; git clone https://github.com/radare/radare2.git; cd radare2; ./sys/install.sh ; make symstall
RUN r2 -V

View file

@ -180,7 +180,6 @@ static bool r_core_rop_load(RCore *core, const char *prjfile) {
char *path, *db = NULL, *path_ns;
bool found = 0;
SdbListIter *it;
int prjType = 0;
SdbNs *ns;
if (!prjfile || !*prjfile) {
@ -200,11 +199,9 @@ static bool r_core_rop_load(RCore *core, const char *prjfile) {
if (r_str_endswith (prjfile, "/rc")) {
// XXX
eprintf ("ENDS WITH\n");
prjType = 1;
path = strdup (prjfile);
path [strlen (path) - 3] = 0;
} else if (r_file_fexists ("%s/rc", prjDir, prjfile)) {
prjType = 1;
path = r_str_newf ("%s/", prjDir, prjfile);
} else {
if (*prjfile == '/') {