# using ubuntu 20 docker image FROM ubuntu:focal ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update # General GCC C/C++ Build toolchain # pkg-config, libtool - used by PocketSphinx # cmake - used by cmsis RUN apt-get install -y --no-install-recommends \ automake \ build-essential \ binutils-dev \ cmake \ git \ libtinfo5 \ libtool \ pkg-config # Needed to install from http endpoints via curl or wget RUN apt-get install -y --no-install-recommends \ curl \ ca-certificates \ libssl-dev \ lsb-release \ gpg-agent \ software-properties-common \ wget # LLVM Tools ENV LLVM_VERSION=8 ADD install_llvm.sh /sledge/install_llvm.sh RUN ./sledge/install_llvm.sh $LLVM_VERSION # Rust RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable --component rustfmt --target wasm32-wasi -y ENV PATH=/root/.cargo/bin:$PATH RUN cargo install --debug cargo-audit cargo-watch rsign2 # WASI-SDK RUN curl -sS -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-8/wasi-sdk_8.0_amd64.deb && dpkg -i wasi-sdk_8.0_amd64.deb && rm -f wasi-sdk_8.0_amd64.deb ENV WASI_SDK=/opt/wasi-sdk # Test Script Stuff RUN apt-get install -y --no-install-recommends \ fonts-dejavu \ fonts-cascadia-code \ fonts-roboto \ imagemagick \ netpbm \ pango1.0-tools \ wamerican # Hey is a load generator we have to recklessly download from the 'net, as it is only published to brew # See https://github.com/rakyll/hey RUN wget https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64 && mv hey_linux_amd64 hey && chmod +x hey && mv hey /usr/bin/hey # Interactive Tools RUN apt-get install -y --no-install-recommends \ bc \ bsdmainutils \ less \ gdb \ strace \ vim # We need to set the locale for pango-view ENV LANG C.UTF-8 ENV LANGUAGE C.UTF-8 ENV LC_ALL C.UTF-8 ENV PATH=/opt/sledge/bin:$PATH ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH # WIP: Try to use a non-root user # # RUN rm /bin/sh && ln -s /bin/bash /bin/sh # ARG USERNAME=dev # ARG USER_UID=1000 # ARG USER_GID=$USER_UID # # Create the user and add to sudoers # RUN groupadd --gid $USER_GID $USERNAME # RUN useradd --uid $USER_UID --gid $USER_GID -m $USERNAME # RUN apt-get update && apt-get install -y sudo # RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ # RUN chmod 0440 /etc/sudoers.d/$USERNAME # # ******************************************************** # # * Anything else you want to do like clean up goes here * # # ******************************************************** # # [Optional] Set the default user. Omit if you want to keep the default as root.