-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
62 lines (54 loc) · 1.68 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM httpd:2.4
# install build tools
RUN apt update \
&& apt install -y \
autoconf \
build-essential \
curl \
gawk \
libgd-dev \
libgeoip-dev \
libpcre3-dev \
libperl-dev \
libssl-dev \
libxml2-dev \
libxslt-dev \
libzip-dev \
apache2-dev \
procps \
unzip \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
# install Rust
ENV RUSTUP_HOME=/opt/rust
ENV CARGO_HOME=/opt/rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.85.0 -y --no-modify-path
ENV PATH=/opt/rust/bin:$PATH
RUN mkdir -p /opt/rust/registry
# get libredirectionio sources
WORKDIR /tmp
RUN wget -O libredirectionio-master.zip https://github.com/redirectionio/libredirectionio/archive/master.zip \
&& unzip libredirectionio-master.zip
# build libredirectionio
WORKDIR /tmp/libredirectionio-master
RUN autoreconf -i \
&& ./configure \
&& make clean \
&& make \
&& make install
# get apache2 redirection.io module sources
WORKDIR /tmp
RUN wget -O libapache2-mod-redirectionio-master.zip https://github.com/redirectionio/libapache2-mod-redirectionio/archive/master.zip \
&& unzip libapache2-mod-redirectionio-master.zip
# build the module
WORKDIR /tmp/libapache2-mod-redirectionio-master
RUN autoreconf -i \
&& ./configure \
&& make clean \
&& make \
&& make install
# Configuration
COPY usr /usr
RUN echo "LoadModule redirectionio_module /usr/lib/apache2/modules/mod_redirectionio.so" >> /usr/local/apache2/conf/httpd.conf
RUN echo "Include conf/extra/httpd-vhosts.conf" >> /usr/local/apache2/conf/httpd.conf