forked from LycheeOrg/Lychee-Docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
59 lines (48 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
53
54
55
56
57
58
59
FROM debian:buster-slim
# Set version label
LABEL maintainer="bigrob8181"
# Environment variables
ENV PUID='1000'
ENV PGID='1000'
ENV USER='lychee'
ENV PHP_TZ=America/New_York
# Add User and Group
RUN \
addgroup --gid "$PGID" "$USER" && \
adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER"
# Install base dependencies, clone the repo and install php libraries
RUN \
apt-get update && \
apt-get install -y \
nginx-light \
php7.3-mysql \
php7.3-pgsql \
php7.3-imagick \
php7.3-mbstring \
php7.3-json \
php7.3-gd \
php7.3-xml \
php7.3-zip \
php7.3-fpm \
git \
composer && \
cd /var/www/html && \
git clone --recurse-submodules https://github.com/LycheeOrg/Lychee-Laravel.git && \
apt-get install -y composer && \
cd /var/www/html/Lychee-Laravel && \
composer install --no-dev && \
chown -R www-data:www-data /var/www/html/Lychee-Laravel && \
apt-get purge -y git composer && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
# Add custom site to apache
COPY default.conf /etc/nginx/nginx.conf
EXPOSE 80
VOLUME /conf /uploads
WORKDIR /var/www/html/Lychee-Laravel
COPY entrypoint.sh inject.sh /
RUN chmod +x /entrypoint.sh && \
chmod +x /inject.sh && \
mkdir /run/php
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "nginx" ]