refactor(Dockerfile): use latest ubuntu version

This commit is contained in:
2026-02-28 21:10:34 +00:00
parent 063423ac34
commit 490b3b771d

View File

@@ -1,31 +1,24 @@
FROM ubuntu:22.04
FROM ubuntu:latest
# 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 \
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/*
# Create a non-root user
ARG USERNAME=developer
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ARG USER_GID=1000
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 \
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/developer/sdk
WORKDIR /home/$USERNAME/sdk
CMD ["/bin/bash"]