From: Ian Cordasco Date: Sat, 3 Dec 2016 13:05:32 +0000 (-0600) Subject: Start working with multiple Dockerfiles X-Git-Tag: upstream/0.2.1^2~47 X-Git-Url: http://andersk.mit.edu/gitweb/libyaml.git/commitdiff_plain/80f22796f123fb7ebe4df820102802af7f8ec1d1 Start working with multiple Dockerfiles As opposed to having a single Dockerfile with support for only one distro. --- 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"]