From 490b3b771d2ac436c8c30735080c848a5205f7c1 Mon Sep 17 00:00:00 2001 From: francesco Date: Sat, 28 Feb 2026 21:10:34 +0000 Subject: [PATCH] refactor(Dockerfile): use latest ubuntu version --- Dockerfile | 55 ++++++++++++++++++++++++------------------------------ 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/Dockerfile b/Dockerfile index 97ac101..2fb912d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,31 +1,24 @@ -FROM ubuntu:22.04 - -# Avoid interactive prompts -ENV DEBIAN_FRONTEND=noninteractive - -RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential automake libtool texinfo bison flex gawk \ - g++ git xxd curl wget gdisk gperf cpio bc screen unzip \ - libgmp-dev libmpfr-dev libmpc-dev libssl-dev libncurses-dev \ - libglib2.0-dev libpixman-1-dev libyaml-dev patchutils python3-pip \ - zlib1g-dev device-tree-compiler dosfstools mtools kpartx rsync \ - sudo ca-certificates \ - && curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \ - && apt-get install -y git-lfs \ - && git lfs install \ - && apt-get clean && rm -rf /var/lib/apt/lists/* - -# Create a non-root user -ARG USERNAME=developer -ARG USER_UID=1000 -ARG USER_GID=$USER_UID - -RUN groupadd --gid $USER_GID $USERNAME \ - && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ - && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ - && chmod 0440 /etc/sudoers.d/$USERNAME - -USER $USERNAME -WORKDIR /home/developer/sdk - -CMD ["/bin/bash"] \ No newline at end of file +FROM ubuntu:latest + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential bc bison flex gawk git \ + libssl-dev libncurses-dev device-tree-compiler \ + python3 python3-setuptools swig \ + mtools dosfstools gdisk rsync wget cpio unzip ca-certificates sudo \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +ARG USERNAME=developer +ARG USER_UID=1000 +ARG USER_GID=1000 + +RUN groupadd --gid $USER_GID $USERNAME || true \ + && (useradd --uid $USER_UID --gid $USER_GID -m $USERNAME || useradd -m $USERNAME) \ + && echo "$USERNAME ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/$USERNAME \ + && chmod 0440 /etc/sudoers.d/$USERNAME + +USER $USERNAME +WORKDIR /home/$USERNAME/sdk + +CMD ["/bin/bash"]