-
Notifications
You must be signed in to change notification settings - Fork 167
Expand file tree
/
Copy pathDockerfile
More file actions
70 lines (50 loc) · 1.63 KB
/
Dockerfile
File metadata and controls
70 lines (50 loc) · 1.63 KB
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
63
64
65
66
67
68
69
70
FROM debian:bookworm AS build
RUN \
apt-get update && \
apt-get --no-install-recommends -y install \
git build-essential pkg-config autoconf automake \
python3 python3-pip python3-dev python3-docutils \
libdb-dev \
libseccomp-dev libjansson-dev libyaml-dev libxml2-dev
WORKDIR /build-berkeleydb/
# NOTE wheel version MUST be sycnhronized with requirements.txt
RUN pip wheel berkeleydb==18.1.10
WORKDIR /build-ctags/
RUN git clone --branch v6.1.0 --depth 1 https://github.com/universal-ctags/ctags.git
WORKDIR ctags
RUN ./autogen.sh && ./configure && make -j $(nproc)
FROM debian:bookworm
RUN \
apt-get update && \
apt-get --no-install-recommends -y install \
python3 \
python3-pip \
python3-venv \
libdb5.3 \
perl \
git \
apache2 \
libapache2-mod-wsgi-py3 \
libjansson4 \
libyaml-0-2 \
wget
COPY ./requirements.txt /usr/local/elixir/
WORKDIR /usr/local/elixir/
COPY --from=build /build-berkeleydb/berkeleydb-*.whl /tmp/build/
RUN python3 -m venv venv && \
. ./venv/bin/activate && \
pip install /tmp/build/berkeleydb-*.whl && \
pip install -r requirements.txt
COPY --from=build /build-ctags/ctags/ctags /usr/bin/ctags
RUN mkdir -p /srv/elixir-data/
COPY ./docker/000-default.conf /etc/apache2/sites-available/000-default.conf
COPY ./docker/gitconfig /etc/gitconfig
RUN a2enmod rewrite headers
EXPOSE 80
ARG ELIXIR_VERSION
ENV ELIXIR_VERSION=$ELIXIR_VERSION \
ELIXIR_ROOT=/srv/elixir-data \
PATH="/usr/local/elixir/utils:/usr/local/elixir/venv/bin:$PATH" \
PYTHONUNBUFFERED=1
COPY . /usr/local/elixir/
ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]