This image consists of LLVM+Clang, version is 11.0.0.
The Dockerfile is below:
# reference: https://baykara.medium.com/installing-clang-10-in-a-docker-container-4c24a4538af2
# Edited by ctenhank:
# - Base OS: ubuntu 18.04 to 20.04
# - The latest version of LLVM+Clang is 11.1.0, but the only supporting Ubuntu OS is 20.10.
# The version of LLVM+Clang is downgraded from 11.1.0 to 11.0.0,
# because the Ubuntu 20.10 seems to be problems in the middle build version.
# This Dockerfile supports only Ubuntu OS.
FROM ubuntu:20.04
ARG LLVM_CLANG_VERSION=11.0.0
# If you want to change the LLVM_CLANG_VERSION,
# you must check the Ubuntu version and architecture whether it supports or not.
# The link: https://github.com/llvm/llvm-project/releases
ARG UBUNTU_VERSION=20.04
ARG ARCH=x86_64
ENV PATH /clang_${LLVM_CLANG_VERSION}/bin:$PATH
ENV LD_LIBRARY_PATH /clang_${LLVM_CLANG_VERSION}/lib:$LD_LIBRARY_PATH
# Installing requirements to get and extract prebuilt binaries
RUN apt-get update && apt-get install -y \
xz-utils \
curl \
&& rm -rf /var/lib/apt/lists/*
# Getting prebuilt binary from llvm
RUN curl -SL https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_CLANG_VERSION}/clang+llvm-${LLVM_CLANG_VERSION}-${ARCH}-linux-gnu-ubuntu-${UBUNTU_VERSION}.tar.xz \
| tar -xJC . && \
mv clang+llvm-${LLVM_CLANG_VERSION}-${ARCH}-linux-gnu-ubuntu-${UBUNTU_VERSION} clang_${LLVM_CLANG_VERSION}
# Starting the container from bash
CMD [ “/bin/bash” ]
Content type
Image
Digest
Size
492.5 MB
Last updated
over 5 years ago
docker pull ctenhank/llvm_clang:12.0.0