Add docker container.

Because clang is outdated on many of my other machines.
This commit is contained in:
Kyle Isom 2017-12-22 13:54:03 -08:00
parent fff6ec6cba
commit cbb1f78f27
2 changed files with 30 additions and 0 deletions

25
Dockerfile Normal file
View File

@ -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"

5
cxe Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
CONTAINER="{CONTAINER:-cc-build:latest}"
docker run -i -t -v $(pwd):/workspace ${CONTAINER} bash