From 80f22796f123fb7ebe4df820102802af7f8ec1d1 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Sat, 3 Dec 2016 07:05:32 -0600 Subject: [PATCH] Start working with multiple Dockerfiles As opposed to having a single Dockerfile with support for only one distro. --- dockerfiles/README.mkd | 17 +++++++++++++++++ dockerfiles/ubuntu-14.04 | 21 +++++++++++++++++++++ Dockerfile => dockerfiles/ubuntu-16.04 | 13 ++++++++++--- 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 dockerfiles/README.mkd create mode 100644 dockerfiles/ubuntu-14.04 rename Dockerfile => dockerfiles/ubuntu-16.04 (51%) diff --git a/dockerfiles/README.mkd b/dockerfiles/README.mkd new file mode 100644 index 0000000..71c13e1 --- /dev/null +++ b/dockerfiles/README.mkd @@ -0,0 +1,17 @@ +# LibYAML Dockerfiles + +This directory is a collection of dockerfiles that can be used when developing +and testing LibYAML. + +The current list is supports: + +- Ubuntu 16.04 +- Ubuntu 14.04 + +## Example Usage + +```bash +$ docker pull ubuntu +$ docker build -t libyaml-ubuntu:16.04 -f dockerfiles/ubuntu-16.04 . +$ docker run -it libyaml-ubuntu:16.04 make test +``` diff --git a/dockerfiles/ubuntu-14.04 b/dockerfiles/ubuntu-14.04 new file mode 100644 index 0000000..7cb0dfd --- /dev/null +++ b/dockerfiles/ubuntu-14.04 @@ -0,0 +1,21 @@ +# vim: ft=dockerfile +FROM ubuntu:14.04 + +RUN apt-get update && \ + apt-get install -y \ + autoconf \ + build-essential \ + git \ + libtool \ + vim && \ + rm -rf /var/lib/apt/lists/* + +RUN mkdir /libyaml +COPY . /libyaml/ +WORKDIR /libyaml + +RUN ./bootstrap +RUN ./configure +RUN make +RUN make install +CMD ["bash"] diff --git a/Dockerfile b/dockerfiles/ubuntu-16.04 similarity index 51% rename from Dockerfile rename to dockerfiles/ubuntu-16.04 index 18030d8..9b793ec 100644 --- a/Dockerfile +++ b/dockerfiles/ubuntu-16.04 @@ -1,14 +1,21 @@ +# vim: ft=dockerfile FROM ubuntu:16.04 + RUN apt-get update && \ apt-get install -y \ autoconf \ build-essential \ git \ - gist \ libtool \ - tig \ - vim + vim && \ + rm -rf /var/lib/apt/lists/* +RUN mkdir /libyaml +COPY . /libyaml/ WORKDIR /libyaml +RUN ./bootstrap +RUN ./configure +RUN make +RUN make install CMD ["bash"] -- 2.45.0