Skip to content

Commit f48206f

Browse files
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.
1 parent 0462c7e commit f48206f

File tree

3 files changed

+63
-36
lines changed

3 files changed

+63
-36
lines changed

full.Dockerfile

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#
2+
# This dockerfile demontrates a build of ragel with full testing. All testing
3+
# dependencies are installed and the test suite is run.
4+
#
5+
6+
FROM ubuntu:focal AS build
7+
8+
ENV DEBIAN_FRONTEND="noninteractive"
9+
10+
# Build dependencies we can get from apt.
11+
RUN apt-get update && apt-get install -y \
12+
git libtool autoconf automake g++ gcc make \
13+
wget clang gnupg gdc default-jdk \
14+
ruby mono-mcs golang ocaml rustc julia \
15+
gnustep-make python2 python-is-python2 \
16+
libpcre3-dev libgnustep-base-dev
17+
18+
WORKDIR /devel/llvm/
19+
RUN wget https://releases.llvm.org/3.3/llvm-3.3.src.tar.gz
20+
RUN tar -zxf llvm-3.3.src.tar.gz
21+
WORKDIR /devel/llvm/llvm-3.3.src
22+
RUN ./configure --prefix=/pkgs/llvm-3.3
23+
RUN make REQUIRES_RTTI=1; exit 0
24+
RUN make install; exit 0
25+
26+
WORKDIR /devel/crack
27+
RUN wget http://crack-lang.org/downloads/crack-1.6.tar.gz
28+
RUN tar -zxf crack-1.6.tar.gz
29+
WORKDIR /devel/crack/crack-1.6
30+
ENV PATH=/pkgs/llvm-3.3/bin:$PATH
31+
RUN ./configure --prefix=/pkgs/crack-1.3
32+
RUN make install
33+
ENV PATH=/pkgs/crack-1.3/bin:$PATH
34+
35+
WORKDIR /devel
36+
RUN git clone https://github.com/adrian-thurston/colm.git
37+
WORKDIR /devel/colm
38+
RUN ./autogen.sh
39+
RUN ./configure --prefix=/pkgs/colm
40+
RUN make install
41+
42+
COPY . /devel/ragel
43+
WORKDIR /devel/ragel
44+
RUN ./autogen.sh
45+
RUN ./configure --prefix=/pkgs/ragel --with-colm=/pkgs/colm
46+
RUN make
47+
48+
WORKDIR /devel/ragel/test
49+
RUN ./runtests
50+

master.Dockerfile

+6-28
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,13 @@
1+
#
2+
# This dockerfile demonstrates a minimal build of ragel off the master branch.
3+
# No manual or testing dependencies are installed.
4+
#
15
FROM ubuntu:focal AS build
26

37
ENV DEBIAN_FRONTEND="noninteractive"
48

5-
# Build dependencies we can get from apt.
69
RUN apt-get update && apt-get install -y \
7-
git libtool autoconf automake g++ gcc make \
8-
wget clang gnupg gdc default-jdk \
9-
ruby mono-mcs golang ocaml rustc julia \
10-
gnustep-make python2 python-is-python2 \
11-
libpcre3-dev libgnustep-base-dev
12-
13-
WORKDIR /devel/llvm/
14-
RUN wget https://releases.llvm.org/3.3/llvm-3.3.src.tar.gz
15-
RUN tar -zxf llvm-3.3.src.tar.gz
16-
WORKDIR /devel/llvm/llvm-3.3.src
17-
RUN ./configure --prefix=/pkgs/llvm-3.3
18-
RUN make REQUIRES_RTTI=1; exit 0
19-
RUN make install; exit 0
20-
21-
WORKDIR /devel/crack
22-
RUN wget http://crack-lang.org/downloads/crack-1.6.tar.gz
23-
RUN tar -zxf crack-1.6.tar.gz
24-
WORKDIR /devel/crack/crack-1.6
25-
ENV PATH=/pkgs/llvm-3.3/bin:$PATH
26-
RUN ./configure --prefix=/pkgs/crack-1.3
27-
RUN make install
28-
ENV PATH=/pkgs/crack-1.3/bin:$PATH
10+
git libtool autoconf automake gcc g++ make
2911

3012
WORKDIR /devel
3113
RUN git clone https://github.com/adrian-thurston/colm.git
@@ -38,8 +20,4 @@ COPY . /devel/ragel
3820
WORKDIR /devel/ragel
3921
RUN ./autogen.sh
4022
RUN ./configure --prefix=/pkgs/ragel --with-colm=/pkgs/colm
41-
RUN make
42-
43-
WORKDIR /devel/ragel/test
44-
RUN ./runtests
45-
23+
RUN make install

release.Dockerfile

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
#
2+
# This dockerfile demonstrates building ragel from release tarballs.
3+
#
4+
15
FROM ubuntu:focal AS build
26

37
ENV DEBIAN_FRONTEND="noninteractive"
48

5-
# Build dependencies we can get from apt.
69
RUN apt-get update && apt-get install -y \
7-
git libtool autoconf automake g++ gcc make \
8-
curl clang gnupg gdc openjdk-14-jdk \
9-
ruby mono-mcs golang ocaml rustc julia
10+
gpg g++ gcc make curl
1011

1112
RUN curl https://www.colm.net/files/thurston.asc | gpg --import -
1213

@@ -17,7 +18,7 @@ RUN curl -O https://www.colm.net/files/colm/colm-${COLM_VERSION}.tar.gz.asc
1718
RUN gpg --verify colm-${COLM_VERSION}.tar.gz.asc colm-${COLM_VERSION}.tar.gz
1819
RUN tar -zxvf colm-${COLM_VERSION}.tar.gz
1920
WORKDIR /build/colm-${COLM_VERSION}
20-
RUN ./configure --prefix=/opt/colm.net/colm --disable-manual
21+
RUN ./configure --prefix=/opt/colm/colm --disable-manual
2122
RUN make
2223
RUN make install
2324

@@ -28,8 +29,6 @@ RUN curl -O https://www.colm.net/files/ragel/ragel-${RAGEL_VERSION}.tar.gz.asc
2829
RUN gpg --verify ragel-${RAGEL_VERSION}.tar.gz.asc ragel-${RAGEL_VERSION}.tar.gz
2930
RUN tar -zxvf ragel-${RAGEL_VERSION}.tar.gz
3031
WORKDIR /build/ragel-${RAGEL_VERSION}
31-
RUN ./configure --prefix=/opt/colm.net/ragel --with-colm=/opt/colm.net/colm --disable-manual
32+
RUN ./configure --prefix=/opt/colm/ragel --with-colm=/opt/colm/colm --disable-manual
3233
RUN make
3334
RUN make install
34-
WORKDIR /build/ragel-${RAGEL_VERSION}/test
35-
RUN ./runtests

0 commit comments

Comments
 (0)