-
Notifications
You must be signed in to change notification settings - Fork 53
/
Dockerfile
52 lines (43 loc) · 1.4 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
FROM mysocietyorg/debian:bullseye
# Apache.
RUN apt-get -qq update && apt-get -qq install \
apache2 \
libapache2-mod-php \
--no-install-recommends && \
rm -r /var/lib/apt/lists/*
# Build dependencies that weren't in `conf/packages`
RUN apt-get -qq update && apt-get -qq install \
bundler \
gcc \
libc6-dev \
libffi-dev \
make \
php-xml \
php-zip \
ruby-dev \
unzip \
php-xdebug \
gettext \
rsync \
--no-install-recommends && \
rm -r /var/lib/apt/lists/*
# `conf/packages` - do last, so changes to runtime dependencies
# don't invalidate caches for the above.
COPY conf/packages /tmp/packages
RUN apt-get update -qq && \
xargs -a /tmp/packages apt-get install -qq --no-install-recommends && \
rm -r /var/lib/apt/lists/*
# Apache - enable some modules redirect output to STDOUT/STDERR
RUN /usr/sbin/a2enmod expires rewrite && \
ln -sfT /proc/self/fd/2 /var/log/apache2/error.log && \
ln -sfT /proc/self/fd/1 /var/log/apache2/access.log && \
ln -sfT /proc/self/fd/1 /var/log/apache2/other_vhosts_access.log
RUN echo "cy_GB.UTF-8 UTF-8" >> /etc/locale.gen
RUN /usr/sbin/locale-gen
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="/root/.local/bin:$PATH"
# Bind mount your working copy here
WORKDIR /twfy
# Apache will run on port 80, so expose it
EXPOSE 80
ENV DEV_MODE=true