mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
Continue work on builder
- add conditional proxy support - use xargs to parallelize image builds - some tweaking and notes
This commit is contained in:
@ -1,15 +1,27 @@
|
||||
FROM ubuntu:22.04
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ARG PROXY
|
||||
ENV http_proxy=${PROXY}
|
||||
#
|
||||
# Include dist
|
||||
COPY dist/ /root/dist/
|
||||
#
|
||||
# Check if APT_PROXY is set and configure apt to use the proxy
|
||||
RUN bash -c 'if [ -n "${http_proxy}" ]; then \
|
||||
echo "Using APT proxy at ${http_proxy}"; \
|
||||
echo "Acquire::http::Proxy \"${http_proxy}\";" > /etc/apt/apt.conf.d/01proxy; \
|
||||
else \
|
||||
echo "APT proxy not configured, proceeding without proxy"; \
|
||||
fi' && \
|
||||
# bash -c 'echo "Acquire::http::Proxy::ports.ubuntu.com DIRECT;" > /etc/apt/apt.conf.d/99force-no-proxy' && \
|
||||
#
|
||||
# Determine arch, get and install packages
|
||||
RUN ARCH=$(arch) && \
|
||||
ARCH=$(arch) && \
|
||||
if [ "$ARCH" = "x86_64" ]; then ARCH="amd64"; fi && \
|
||||
if [ "$ARCH" = "aarch64" ]; then ARCH="arm64"; fi && \
|
||||
echo "$ARCH" && \
|
||||
cd /root/dist/ && \
|
||||
# Setup apt
|
||||
apt-get update -y && \
|
||||
apt-get install wget -y && \
|
||||
wget http://ftp.us.debian.org/debian/pool/main/libe/libemu/libemu2_0.2.0+git20120122-1.2+b1_$ARCH.deb \
|
||||
@ -110,6 +122,7 @@ RUN ARCH=$(arch) && \
|
||||
apt-get autoremove --purge -y && \
|
||||
apt-get clean && \
|
||||
rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache /opt/dionaea/.git
|
||||
ENV http_proxy=""
|
||||
#
|
||||
# Start dionaea
|
||||
STOPSIGNAL SIGINT
|
||||
|
Reference in New Issue
Block a user