1#===- llvm/utils/docker/example/build/Dockerfile -------------------------===// 2# 3# The LLVM Compiler Infrastructure 4# 5# This file is distributed under the University of Illinois Open Source 6# License. See LICENSE.TXT for details. 7# 8#===----------------------------------------------------------------------===// 9# This is an example Dockerfile to build an image that compiles clang. 10# Replace FIXMEs to prepare your own image. 11 12# Stage 1. Check out LLVM source code and run the build. 13# FIXME: Replace 'ubuntu' with your base image 14FROM ubuntu as builder 15# FIXME: Change maintainer name 16LABEL maintainer "Maintainer <maintainer@email>" 17# FIXME: Install llvm/clang build dependencies here. Including compiler to 18# build stage1, cmake, subversion, ninja, etc. 19 20ADD checksums /tmp/checksums 21ADD scripts /tmp/scripts 22# Arguments passed to build_install_clang.sh. 23ARG buildscript_args 24# Run the build. Results of the build will be available as /tmp/clang-install. 25RUN /tmp/scripts/build_install_llvm.sh ${buildscript_args} 26 27 28# Stage 2. Produce a minimal release image with build results. 29# FIXME: Replace 'ubuntu' with your base image. 30FROM ubuntu 31# FIXME: Change maintainer name. 32LABEL maintainer "Maintainer <maintainer@email>" 33# FIXME: Install all packages you want to have in your release container. 34# A minimal useful installation should include at least libstdc++ and binutils. 35 36# Copy build results of stage 1 to /usr/local. 37COPY --from=builder /tmp/clang-install/ /usr/local/ 38