# Use an official Ubuntu as a base image
FROM ubuntu:22.04

# Set the environment to non-interactive to avoid interactive prompts during installation
ENV DEBIAN_FRONTEND=noninteractive

# Update and install system dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    build-essential \
    vim \
    python3-venv \
    gawk \
    python-is-python3 \
    openssh-client \
    curl \
    bison \
    gcc \
    scons \
    zip \
    bash \
    git \
    automake \
    pkg-config \
    unzip \
    libncurses5-dev \
    g++ \
    python3 \
    cmake \
    rsync \
    libssl-dev \
    mtools \
    xz-utils \
    libyaml-dev \
    flex \
    patch \
    ca-certificates \
    jq \
    python3-pip \
    sshpass \
    libconfuse-dev \
    make \
    wget \
    autoconf \
    dosfstools \
    bzip2 \
    && apt-get clean && \
    update-ca-certificates && \
    rm -rf /var/lib/apt/lists/*

RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

# Install required Python packages
RUN pip3 install pycryptodome gmssl jsonschema jinja2 pyyaml
