代码拉取完成,页面将自动刷新
FROM python:3-buster AS build-and-install
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/src/app/bin \
DEBIAN_FRONTEND=noninteractive
COPY . /tmp
WORKDIR /tmp
### Took out the deps.sh from binwalk's installation script, baked in the dependencies into the main prereqs installation
### The prereqs that dont come from system's repo, are taken care of later
RUN set -xue \
&& apt-get update -qy \
&& apt-get -t buster dist-upgrade -yq --no-install-recommends -o Dpkg::Options::="--force-confold" \
&& ./deps.sh --yes \
&& python3 setup.py install && binwalk -h > /dev/null \
&& apt-get -yq purge *-dev git build-essential gcc g++ \
&& apt-get -y autoremove \
&& apt-get -y autoclean \
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& echo "LANG=en_US.UTF-8" >> /etc/default/locale \
&& echo "LANGUAGE=en_US:en" >> /etc/default/locale \
&& echo "LC_ALL=en_US.UTF-8" >> /etc/default/locale \
&& locale-gen
FROM build-and-install AS unit-tests
RUN pip install coverage nose \
&& python3 setup.py test \
&& dd if=/dev/urandom of=/tmp/random.bin bs=1M count=1 && binwalk -J -E /tmp/random.bin
FROM build-and-install AS cleanup-and-release
RUN useradd -m -u 1000 -s /sbin/nologin appuser \
&& rm -rf -- \
/var/lib/apt/lists/* \
/tmp/* /var/tmp/* \
/root/.cache/pip
# Setup locale. This prevents Python 3 IO encoding issues.
ENV DEBIAN_FRONTEND=teletype \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8 \
PYTHONUTF8="1" \
PYTHONHASHSEED="random"
WORKDIR /home/appuser
USER appuser
ENTRYPOINT ["binwalk"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。