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 ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential automake libtool texinfo bison flex gawk \ build-essential bc bison flex gawk git \
g++ git xxd curl wget gdisk gperf cpio bc screen unzip \ libssl-dev libncurses-dev device-tree-compiler \
libgmp-dev libmpfr-dev libmpc-dev libssl-dev libncurses-dev \ python3 python3-setuptools swig \
libglib2.0-dev libpixman-1-dev libyaml-dev patchutils python3-pip \ mtools dosfstools gdisk rsync wget cpio unzip ca-certificates sudo \
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/* && apt-get clean && rm -rf /var/lib/apt/lists/*
# Create a non-root user
ARG USERNAME=developer ARG USERNAME=developer
ARG USER_UID=1000 ARG USER_UID=1000
ARG USER_GID=$USER_UID ARG USER_GID=1000
RUN groupadd --gid $USER_GID $USERNAME \ RUN groupadd --gid $USER_GID $USERNAME || true \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ && (useradd --uid $USER_UID --gid $USER_GID -m $USERNAME || useradd -m $USERNAME) \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ && echo "$USERNAME ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME && chmod 0440 /etc/sudoers.d/$USERNAME
USER $USERNAME USER $USERNAME
WORKDIR /home/developer/sdk WORKDIR /home/$USERNAME/sdk
CMD ["/bin/bash"] CMD ["/bin/bash"]