chore: Dockerfile changes

dockerfile-cleanup
Sean McBride 3 years ago
parent 492f61ae93
commit a0c4f044fc

@ -2,10 +2,8 @@
FROM ubuntu:focal FROM ubuntu:focal
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
ARG HEY_URL=https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64
ARG WASI_SDK_URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk_12.0_amd64.deb
ARG SHFMT_URL=https://github.com/mvdan/sh/releases/download/v3.2.4/shfmt_v3.2.4_linux_amd64 ARG SHFMT_URL=https://github.com/mvdan/sh/releases/download/v3.2.4/shfmt_v3.2.4_linux_amd64
ARG SHELLCHECK_URL=https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz ARG WASI_SDK_URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk_12.0_amd64.deb
# Use bash, not sh # Use bash, not sh
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
@ -25,55 +23,53 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
binutils-dev \ binutils-dev \
cmake \ cmake \
git \ git \
gdb \
libtinfo5 \ libtinfo5 \
libtool \ libtool \
make \
pkg-config pkg-config
# Needed to install from http endpoints via curl or wget # Needed to install from http endpoints via curl or wget
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \ ca-certificates \
curl \
gpg-agent \
hey \
httpie \
libssl-dev \ libssl-dev \
lsb-release \ lsb-release \
gpg-agent \ openssh-client \
software-properties-common \ software-properties-common \
wget wget
# Test Script Stuff # Test Script Stuff
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
bc \ bc \
bsdmainutils \
fonts-dejavu \ fonts-dejavu \
fonts-cascadia-code \ fonts-cascadia-code \
fonts-roboto \ fonts-roboto \
gnuplot \ gnuplot \
httpie \
imagemagick \ imagemagick \
jq \ jq \
libz3-4 \ libz3-4 \
netpbm \ netpbm \
pango1.0-tools \ pango1.0-tools \
shellcheck \
wamerican wamerican
# Hey is a load generator we have to recklessly download from the 'net, as it is only published to brew
# Binaries are only provided for AMD64 though, so ARM will have to build from source
# See https://github.com/rakyll/hey
RUN wget $HEY_URL -O hey && chmod +x hey && mv hey /usr/bin/hey
# shfmt is a formatter for shell scripts
RUN wget $SHFMT_URL -O shfmt && chmod +x shfmt && mv shfmt /usr/local/bin/shfmt
RUN wget $SHELLCHECK_URL -O shellcheck && chmod +x shellcheck && mv shellcheck /usr/local/bin/shellcheck
# Interactive Tools # Interactive Tools
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
bsdmainutils \
gdb \ gdb \
less \ less \
openssh-client \
strace \ strace \
valgrind \ valgrind \
vim \ vim \
wabt wabt
# shfmt is a formatter for shell scripts
RUN wget $SHFMT_URL -O shfmt && chmod +x shfmt && mv shfmt /usr/local/bin/shfmt
ENV LLVM_VERSION=12 ENV LLVM_VERSION=12
ADD install_llvm.sh /sledge/install_llvm.sh ADD install_llvm.sh /sledge/install_llvm.sh
RUN ./sledge/install_llvm.sh $LLVM_VERSION RUN ./sledge/install_llvm.sh $LLVM_VERSION
@ -114,8 +110,3 @@ RUN cargo install --debug cargo-audit cargo-watch rsign2
ENV LANG C.UTF-8 ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8 ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8 ENV LC_ALL C.UTF-8
# Update PATH and LD_LIBRARY_PATH
ENV PATH=/sledge/runtime/bin:$PATH
ENV PATH=/sledge/awsm/target/release:$PATH
ENV LD_LIBRARY_PATH=/sledge/runtime/bin:$LD_LIBRARY_PATH

@ -16,50 +16,58 @@ else
exit 1 exit 1
fi fi
sudo apt-get update && sudo apt-get install -y --no-install-recommends \ # General GCC C/C++ Build toolchain
apt-utils \ # pkg-config, libtool - used by PocketSphinx
man-db \ # cmake - used by cmsis
&& yes | unminimize sudo apt-get update && apt-get install -y --no-install-recommends \
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
automake \ automake \
bc \
bsdmainutils \
build-essential \ build-essential \
binutils-dev \ binutils-dev \
ca-certificates \
cmake \ cmake \
git \
libtinfo5 \
libtool \
make \
pkg-config
# Network Tools
sudo apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \ curl \
gpg-agent \
hey \
httpie \
libssl-dev \
lsb-release \
openssh-client \
software-properties-common \
wget
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
bc \
bsdmainutils \
fonts-dejavu \ fonts-dejavu \
fonts-cascadia-code \ fonts-cascadia-code \
fonts-roboto \ fonts-roboto \
gdb \
git \
gpg-agent \
gnuplot \ gnuplot \
hey \
httpie \
imagemagick \ imagemagick \
jq \ jq \
less \
libssl-dev \
libtinfo5 \
libtool \
libz3-4 \ libz3-4 \
lsb-release \
make \
netpbm \ netpbm \
openssh-client \
pango1.0-tools \ pango1.0-tools \
pkg-config \
shellcheck \ shellcheck \
software-properties-common \ wamerican
# Interactive Tools
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
gdb \
less \
strace \ strace \
valgrind \ valgrind \
wabt \ vim \
wamerican \ wabt
wget
# shfmt is a formatter for shell scripts
wget $SHFMT_URL -O shfmt && chmod +x shfmt && sudo mv shfmt /usr/local/bin/shfmt wget $SHFMT_URL -O shfmt && chmod +x shfmt && sudo mv shfmt /usr/local/bin/shfmt
sudo ./install_llvm.sh $LLVM_VERSION sudo ./install_llvm.sh $LLVM_VERSION

Loading…
Cancel
Save