istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/test/echo/docker/Dockerfile.app_sidecar_base (about)

     1  ARG VM_IMAGE_NAME=ubuntu
     2  ARG VM_IMAGE_VERSION=noble
     3  FROM ${VM_IMAGE_NAME}:${VM_IMAGE_VERSION}
     4  # Dockerfile for different VM OS versions
     5  ENV DEBIAN_FRONTEND=noninteractive
     6  
     7  # Do not add more stuff to this list that isn't small or critically useful.
     8  # If you occasionally need something on the container do
     9  # sudo apt-get update && apt-get whichever
    10  
    11  # hadolint ignore=DL3005,DL3008
    12  RUN apt-get update && \
    13      apt-get install --no-install-recommends -y \
    14      ca-certificates \
    15      curl \
    16      iptables \
    17      iproute2 \
    18      iputils-ping \
    19      knot-dnsutils \
    20      netcat-openbsd \
    21      tcpdump \
    22      conntrack \
    23      bsdmainutils \
    24      net-tools \
    25      lsof \
    26      sudo \
    27      && apt-get upgrade -y \
    28      && apt-get clean \
    29      && rm -rf  /var/log/*log /var/lib/apt/lists/* /var/log/apt/* /var/lib/dpkg/*-old /var/cache/debconf/*-old
    30  
    31  RUN if [ -f /usr/sbin/iptables-legacy ]; then \
    32      update-alternatives --set iptables /usr/sbin/iptables-legacy && \
    33      update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy; fi
    34  
    35  # Add a user that will run the application. This allows running as this user and capture iptables
    36  RUN useradd -m --uid 1338 application && \
    37      echo "application ALL=NOPASSWD: ALL" >> /etc/sudoers