FROM ubuntu:20.04 ENV TZ=Asia/Shanghai USER root ARG USER=user RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ apt-get update -qq && \ apt-get install -qqy gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 python2.7 unzip zlib1g-dev subversion flex uglifyjs git-core p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler antlr3 gperf wget curl swig rsync sudo golang-go&& \ apt-get autoremove --purge && \ apt-get clean && \ useradd -m -s $(which bash) $USER && \ echo "$USER:$USER" | chpasswd && \ echo "$USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER && \ chmod 440 /etc/sudoers.d/$USER && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* USER user WORKDIR /home/user