我正在尝试构建以下Radare2 dockerfile,但我想我可能有一些格式错误。我似乎无法弄清楚如何正确安装和构建所有内容。任何帮助将不胜感激。
FROM radare/radare2
USER root
RUN apt-get update && \
apt-get install -y \
build-essential \
nasm \
gdb \
python \
python-pip \
python-dev \
vim \
git \
libffi-dev \
libssl-dev \
libc6-i386 \
lsb-core \
pip install --upgrade pip \
pip install --upgrade pwntools \
libc6-dev-i386
USER r2
RUN git clone https://github.com/longld/peda.git ~/peda && \
echo "source ~/peda/peda.py" >> ~/.gdbinit
RUN \
"/bin/bash"
当我尝试构建此dockerfile时出现以下错误:
E: Unable to locate package pip
E: Unable to locate package install
E: Unable to locate package pip
E: Unable to locate package pip
E: Unable to locate package install
E: Unable to locate package pwntools
答案 0 :(得分:1)
pip install
行是使用RUN
关键字的新命令,而不是apt-get
的一部分,因此您需要删除之前的反弹并在行之前添加RUN
。试试这个:
FROM radare/radare2
USER root
RUN apt-get update && \
apt-get install -y \
build-essential \
nasm \
gdb \
python \
python-pip \
python-dev \
vim \
git \
libffi-dev \
libssl-dev \
libc6-i386 \
libc6-dev-i386 \
lsb-core
RUN pip install --upgrade pip
RUN pip install --upgrade pwntools
USER r2
RUN git clone https://github.com/longld/peda.git ~/peda && \
echo "source ~/peda/peda.py" >> ~/.gdbinit
RUN "/bin/bash"
答案 1 :(得分:0)
或更好:
RUN apt-get update && \
apt-get install -y \
build-essential \
(...)
lsb-core \
&& pip install --upgrade pip \
&& pip install --upgrade pwntools