From cbb1f78f27b88978de401a0f9d90fbbd396c001f Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Fri, 22 Dec 2017 13:54:03 -0800 Subject: [PATCH] Add docker container. Because clang is outdated on many of my other machines. --- Dockerfile | 25 +++++++++++++++++++++++++ cxe | 5 +++++ 2 files changed, 30 insertions(+) create mode 100644 Dockerfile create mode 100755 cxe diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6dc025c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +# C++ build environment. Useful with the following script that should +# be run from a repo: +##!/bin/sh +# +#CONTAINER="{CONTAINER:-cc-build:latest}" +# +#docker run -i -t -v $(pwd):/workspace ${CONTAINER} bash +# +# NB: Ubuntu 17.10 seems to be the only common distro with C++17 support. +FROM ubuntu:17.10 +MAINTAINER kyle + +# install tools +RUN apt-get -y update && apt-get -y install clang-5.0 autoconf automake libtool cmake ninja-build texinfo curl mg + +# make the env pick up the correct compilers. +ENV CXX=clang++-5.0 +ENV CC=clang-5.0 + +# set up workspace +RUN mkdir /workspace +WORKDIR /workspace + +# start compiling already +CMD "bash" diff --git a/cxe b/cxe new file mode 100755 index 0000000..cf1203d --- /dev/null +++ b/cxe @@ -0,0 +1,5 @@ +#!/bin/sh + +CONTAINER="{CONTAINER:-cc-build:latest}" + +docker run -i -t -v $(pwd):/workspace ${CONTAINER} bash