Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/docker_files/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ See the [Quick Start section of the top-level README](../../README.md#quick-star

A docker image can be built with following command:
```sh
cd mbedtls-test/dev_envs/docker_files
cd mbedtls-test/resources/docker_files
sudo docker build --network=host -t ubuntu-18.04 -f ubuntu-18.04/Dockerfile .
```
This creates an image from the specified file. The built image is maintained by docker in its own workspace on the host. Don't worry where the built image is gone! From this point the built image is referred by its tag name. For example `ubuntu-18.04`. See [Listing images](#listing-images) below.
Expand Down
9 changes: 8 additions & 1 deletion resources/docker_files/ubuntu-16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@ RUN apt-get update -q && apt-get install -yq \
autotools-dev \
# to build Mbed TLS: gcc, binutils, make, etc.
build-essential \
# to build Mbed TLS using earliest gcc version
gcc-4.7 \
# to generate malformed files
bsdmainutils \
# to build Mbed TLS
clang \
# to build Mbed TLS using earliest clang version
clang-3.5 \
# to build Mbed TLS
cmake \
# to build Mbed TLS's documentation
Expand Down Expand Up @@ -112,7 +116,10 @@ RUN apt-get update -q && apt-get install -yq \
libstdc++6:armhf \
;; \
esac && \
rm -rf /var/lib/apt/lists/
rm -rf /var/lib/apt/lists/ && \
# create symbolic links for earliest gcc and clang versions
ln -s /usr/bin/gcc-4.7 /usr/local/bin/gcc-earliest && \
ln -s /usr/bin/clang-3.5 /usr/local/bin/clang-earliest

# Install all the parts of gcc-multilib, which is necessary for 32-bit builds.
# gcc-multilib conflicts with cross-compiler packages that we'll install later,
Expand Down
17 changes: 16 additions & 1 deletion resources/docker_files/ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ RUN apt-get update -q && apt-get install -yq \
faketime \
# to cross-build Mbed TLS
gcc-mingw-w64-i686 \
# to build Mbed TLS using latest gcc version available from Ubuntu
gcc-12 \
# to check out Mbed TLS and others
git \
# to build Mbed TLS's documentation
Expand All @@ -90,6 +92,8 @@ RUN apt-get update -q && apt-get install -yq \
pkg-config \
# to install Python packages
python3-pip \
# provides some useful scripts for adding and removing repositories
software-properties-common \
# for Mbed TLS tests
valgrind \
# to download things installed from other places
Expand Down Expand Up @@ -118,7 +122,18 @@ RUN apt-get update -q && apt-get install -yq \
libstdc++6:armhf \
;; \
esac && \
rm -rf /var/lib/apt/lists/
rm -rf /var/lib/apt/lists/

# For installing clang-16, we add the llvm package source and add corresponding key
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 15CF4D18AF4F7421 && \
# add an apt package source from https://apt.llvm.org/
add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main' -y && \
apt-get install -yq \
# to build Mbed TLS using latest clang version at the time of writing
clang-16 && \
# create symbolic links for latest gcc and clang versions
ln -s /usr/bin/clang-16 /usr/local/bin/clang-latest && \
ln -s /usr/bin/gcc-12 /usr/local/bin/gcc-latest

# Install all the parts of gcc-multilib, which is necessary for 32-bit builds.
# gcc-multilib conflicts with cross-compiler packages that we'll install later,
Expand Down