diff --git a/docker/build_images.sh b/docker/build_images.sh index a8ed910830c..b5c70caf44b 100755 --- a/docker/build_images.sh +++ b/docker/build_images.sh @@ -31,4 +31,5 @@ pushd "${REPO_ROOT}/docker" &>/dev/null docker build -t rust:linux-386 linux-386 --load "${EXTRA_ARGS[@]}" docker build -t rust:linux-arm64 linux-arm64 --load "${EXTRA_ARGS[@]}" docker build -t rust:linux-x86_64 linux-x86_64 --load "${EXTRA_ARGS[@]}" +docker build -t ubuntu:18.04 ubuntu-18.04 --load "${EXTRA_ARGS[@]}" popd &>/dev/null diff --git a/docker/ubuntu-18.04/Dockerfile b/docker/ubuntu-18.04/Dockerfile new file mode 100644 index 00000000000..2b9de3ce4d8 --- /dev/null +++ b/docker/ubuntu-18.04/Dockerfile @@ -0,0 +1,33 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 OR ISC + +FROM --platform=linux/amd64 ubuntu:18.04 + +SHELL ["/bin/bash", "-c"] + +ARG GOPROXY=direct + +RUN apt-get update && \ + apt-get install -y ca-certificates && \ + apt-get install -y build-essential git cmake curl sudo && \ + apt-get install -y --no-install-recommends gpg-agent software-properties-common && \ + add-apt-repository --yes ppa:longsleep/golang-backports && \ + add-apt-repository --yes --update ppa:ubuntu-toolchain-r/test && \ + apt-get update && \ + apt-get install --assume-yes --no-install-recommends build-essential cmake golang-go clang gcc-4.8 gcc-5 gcc-6 && \ + git config --global --add safe.directory '*' && \ + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > ./rustup.sh && \ + chmod +x ./rustup.sh && \ + ./rustup.sh -y && \ + . "$HOME/.cargo/env" && \ + rustup component add rustfmt clippy && \ + rm ./rustup.sh && \ + cargo install rust-script && \ + apt-get autoremove --purge -y && \ + apt-get clean && \ + apt-get autoclean && \ + rm -rf /var/lib/apt/lists/* && \ + rm -rf /tmp/* + +ENV CC=gcc-6 +ENV CXX=g++-6