Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (50 loc) · 1.74 KB
/
Copy pathDockerfile
File metadata and controls
60 lines (50 loc) · 1.74 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
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 \
mariadb-client \
--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
# install the font
RUN mkdir -p /usr/local/share/fonts/truetype/merriweather \
&& curl -L https://github.com/google/fonts/raw/refs/heads/main/ofl/merriweather/Merriweather%5Bopsz,wdth,wght%5D.ttf \
-o /usr/local/share/fonts/truetype/merriweather/Merriweather.ttf \
&& fc-cache -f -v
RUN echo "cy_GB.UTF-8 UTF-8" >> /etc/locale.gen
RUN /usr/sbin/locale-gen
ENV POETRY_VERSION 2.2.1
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