add imported target example and cmake 3.5.1 docker

This commit is contained in:
Thom Troy
2016-08-19 22:28:42 +01:00
parent f9f1a5bbb0
commit bb61b1683d
9 changed files with 185 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ For example:
[source,bash]
----
$ docker build --rm -f ubuntu14.04-cmake-3.4.3 t matrim/cmake-examples:3.4.3 .
$ docker build --rm -f ubuntu14.04-cmake-3.4.3 -t matrim/cmake-examples:3.4.3 .
----
In this example the tag is created as follows
@@ -45,6 +45,10 @@ The images available include the following versions of cmake:
$ docker pull docker pull matrim/cmake-examples:3.4.3
* Ubuntu 16.04 with CMake 3.5.1
$ docker pull docker pull matrim/cmake-examples:3.5.1
# Running
When run the images will automatically create a non root user called devuser, with a default command to launch a bash shell in the users home directory.
@@ -76,5 +80,5 @@ Below is an example of loading a volume and automatically running all cmake-exam
[source,bash]
----
docker run -e DEV_UID=`id -u` -e DEV_GID=`id -u` -v /checkout/directory:/data/code -it matrim/cmake-examples:3.4.3 /data/code/test.sh
docker run --rm -e DEV_UID=`id -u` -e DEV_GID=`id -u` -v /checkout/directory:/data/code -it matrim/cmake-examples:3.4.3 /data/code/test.sh
----

View File

@@ -0,0 +1,23 @@
# Container for building and testing cmake-examples with default cmake v2.8.12.2
FROM ubuntu:16.04
MAINTAINER Thom Troy
RUN apt-get update && apt-get install -y build-essential \
sudo \
cmake \
libboost-all-dev \
libprotobuf-dev \
protobuf-compiler \
cppcheck \
clang-3.6 \
ninja-build \
wget \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ADD setup.sh /setup.sh
RUN chmod +x /setup.sh
CMD ["/bin/bash"]
ENTRYPOINT ["/setup.sh"]