-
-
Notifications
You must be signed in to change notification settings - Fork 88
/
Dockerfile
79 lines (59 loc) · 1.97 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
FROM docker.io/library/php:8.3-fpm-alpine
# Build with: `docker build . --tag leantime:devel`
##########################
#### ENVIRONMENT INFO ####
##########################
# Change version to trigger build
ARG LEAN_VERSION=3.3.3
WORKDIR /var/www/html
ENTRYPOINT ["/start.sh"]
EXPOSE 80
########################
#### IMPLEMENTATION ####
########################
# Install dependencies
RUN apk add --no-cache \
mysql-client \
openldap-dev\
libzip-dev \
zip \
freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev oniguruma-dev \
icu-libs \
jpegoptim optipng pngquant gifsicle \
supervisor \
apache2 \
openssl \
apache2-ctl \
apache2-proxy
## Installing extensions ##
# Running in a single command is worse for caching/build failures, but far better for image size
RUN docker-php-ext-install \
mysqli pdo_mysql mbstring exif pcntl pdo bcmath opcache ldap zip \
&& \
docker-php-ext-enable zip \
&& \
docker-php-ext-configure gd \
--enable-gd \
--with-jpeg=/usr/include/ \
--with-freetype \
--with-jpeg \
&& \
docker-php-ext-install gd
## Installing Leantime ##
# (silently) Download the specified release, piping output directly to `tar`
RUN curl -sL https://github.com/Leantime/leantime/releases/download/v${LEAN_VERSION}/Leantime-v${LEAN_VERSION}.tar.gz | \
tar \
--ungzip \
--extract \
--verbose \
--strip-components 1
RUN chown www-data:www-data -R .
COPY ./start.sh /start.sh
RUN chmod +x /start.sh
COPY config/custom.ini /usr/local/etc/php/conf.d/custom.ini
# Configure supervisord
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY config/app.conf /etc/apache2/conf.d/app.conf
RUN sed -i '/LoadModule rewrite_module/s/^#//g' /etc/apache2/httpd.conf && \
sed -i 's#AllowOverride [Nn]one#AllowOverride All#' /etc/apache2/httpd.conf && \
sed -i '$iLoadModule proxy_module modules/mod_proxy.so' /etc/apache2/httpd.conf