diff options
author | Adrian Thurston <thurston@colm.net> | 2021-12-27 19:32:48 +0000 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2021-12-27 19:35:20 +0000 |
commit | f48206f992852784093c851dc4fca337c7dbf65f (patch) | |
tree | 22196a286646d0a8fae34de0df632f3f060020a9 | |
parent | 0462c7e50ec337e9d60e84be0ca5f679a7f27f43 (diff) | |
download | ragel-f48206f992852784093c851dc4fca337c7dbf65f.tar.gz |
three dockerfiles
* full.Dockerfile installs all dependencies, builds master and does full
testing.
* master.Dockerfile does a minimal build from master.
* release.Dockerfile builds and installs release tarballs.
-rw-r--r-- | full.Dockerfile | 50 | ||||
-rw-r--r-- | master.Dockerfile | 34 | ||||
-rw-r--r-- | release.Dockerfile | 15 |
3 files changed, 63 insertions, 36 deletions
diff --git a/full.Dockerfile b/full.Dockerfile new file mode 100644 index 00000000..508fee8a --- /dev/null +++ b/full.Dockerfile @@ -0,0 +1,50 @@ +# +# This dockerfile demontrates a build of ragel with full testing. All testing +# dependencies are installed and the test suite is run. +# + +FROM ubuntu:focal AS build + +ENV DEBIAN_FRONTEND="noninteractive" + +# Build dependencies we can get from apt. +RUN apt-get update && apt-get install -y \ + git libtool autoconf automake g++ gcc make \ + wget clang gnupg gdc default-jdk \ + ruby mono-mcs golang ocaml rustc julia \ + gnustep-make python2 python-is-python2 \ + libpcre3-dev libgnustep-base-dev + +WORKDIR /devel/llvm/ +RUN wget https://releases.llvm.org/3.3/llvm-3.3.src.tar.gz +RUN tar -zxf llvm-3.3.src.tar.gz +WORKDIR /devel/llvm/llvm-3.3.src +RUN ./configure --prefix=/pkgs/llvm-3.3 +RUN make REQUIRES_RTTI=1; exit 0 +RUN make install; exit 0 + +WORKDIR /devel/crack +RUN wget http://crack-lang.org/downloads/crack-1.6.tar.gz +RUN tar -zxf crack-1.6.tar.gz +WORKDIR /devel/crack/crack-1.6 +ENV PATH=/pkgs/llvm-3.3/bin:$PATH +RUN ./configure --prefix=/pkgs/crack-1.3 +RUN make install +ENV PATH=/pkgs/crack-1.3/bin:$PATH + +WORKDIR /devel +RUN git clone https://github.com/adrian-thurston/colm.git +WORKDIR /devel/colm +RUN ./autogen.sh +RUN ./configure --prefix=/pkgs/colm +RUN make install + +COPY . /devel/ragel +WORKDIR /devel/ragel +RUN ./autogen.sh +RUN ./configure --prefix=/pkgs/ragel --with-colm=/pkgs/colm +RUN make + +WORKDIR /devel/ragel/test +RUN ./runtests + diff --git a/master.Dockerfile b/master.Dockerfile index 6df82975..9c258261 100644 --- a/master.Dockerfile +++ b/master.Dockerfile @@ -1,31 +1,13 @@ +# +# This dockerfile demonstrates a minimal build of ragel off the master branch. +# No manual or testing dependencies are installed. +# FROM ubuntu:focal AS build ENV DEBIAN_FRONTEND="noninteractive" -# Build dependencies we can get from apt. RUN apt-get update && apt-get install -y \ - git libtool autoconf automake g++ gcc make \ - wget clang gnupg gdc default-jdk \ - ruby mono-mcs golang ocaml rustc julia \ - gnustep-make python2 python-is-python2 \ - libpcre3-dev libgnustep-base-dev - -WORKDIR /devel/llvm/ -RUN wget https://releases.llvm.org/3.3/llvm-3.3.src.tar.gz -RUN tar -zxf llvm-3.3.src.tar.gz -WORKDIR /devel/llvm/llvm-3.3.src -RUN ./configure --prefix=/pkgs/llvm-3.3 -RUN make REQUIRES_RTTI=1; exit 0 -RUN make install; exit 0 - -WORKDIR /devel/crack -RUN wget http://crack-lang.org/downloads/crack-1.6.tar.gz -RUN tar -zxf crack-1.6.tar.gz -WORKDIR /devel/crack/crack-1.6 -ENV PATH=/pkgs/llvm-3.3/bin:$PATH -RUN ./configure --prefix=/pkgs/crack-1.3 -RUN make install -ENV PATH=/pkgs/crack-1.3/bin:$PATH + git libtool autoconf automake gcc g++ make WORKDIR /devel RUN git clone https://github.com/adrian-thurston/colm.git @@ -38,8 +20,4 @@ COPY . /devel/ragel WORKDIR /devel/ragel RUN ./autogen.sh RUN ./configure --prefix=/pkgs/ragel --with-colm=/pkgs/colm -RUN make - -WORKDIR /devel/ragel/test -RUN ./runtests - +RUN make install diff --git a/release.Dockerfile b/release.Dockerfile index 1f35eb94..ab1a159e 100644 --- a/release.Dockerfile +++ b/release.Dockerfile @@ -1,12 +1,13 @@ +# +# This dockerfile demonstrates building ragel from release tarballs. +# + FROM ubuntu:focal AS build ENV DEBIAN_FRONTEND="noninteractive" -# Build dependencies we can get from apt. RUN apt-get update && apt-get install -y \ - git libtool autoconf automake g++ gcc make \ - curl clang gnupg gdc openjdk-14-jdk \ - ruby mono-mcs golang ocaml rustc julia + gpg g++ gcc make curl RUN curl https://www.colm.net/files/thurston.asc | gpg --import - @@ -17,7 +18,7 @@ RUN curl -O https://www.colm.net/files/colm/colm-${COLM_VERSION}.tar.gz.asc RUN gpg --verify colm-${COLM_VERSION}.tar.gz.asc colm-${COLM_VERSION}.tar.gz RUN tar -zxvf colm-${COLM_VERSION}.tar.gz WORKDIR /build/colm-${COLM_VERSION} -RUN ./configure --prefix=/opt/colm.net/colm --disable-manual +RUN ./configure --prefix=/opt/colm/colm --disable-manual RUN make RUN make install @@ -28,8 +29,6 @@ RUN curl -O https://www.colm.net/files/ragel/ragel-${RAGEL_VERSION}.tar.gz.asc RUN gpg --verify ragel-${RAGEL_VERSION}.tar.gz.asc ragel-${RAGEL_VERSION}.tar.gz RUN tar -zxvf ragel-${RAGEL_VERSION}.tar.gz WORKDIR /build/ragel-${RAGEL_VERSION} -RUN ./configure --prefix=/opt/colm.net/ragel --with-colm=/opt/colm.net/colm --disable-manual +RUN ./configure --prefix=/opt/colm/ragel --with-colm=/opt/colm/colm --disable-manual RUN make RUN make install -WORKDIR /build/ragel-${RAGEL_VERSION}/test -RUN ./runtests |