forked from benjaminjonard/koillection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
66 lines (55 loc) · 1.72 KB
/
Dockerfile.dev
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
FROM ubuntu:jammy
ARG DEBIAN_FRONTEND=noninteractive
# Environment variables
ENV APP_ENV='dev'
ENV PUID='1001'
ENV PGID='1001'
ENV USER='koillection'
COPY ./docker/entrypoint-dev.sh /entrypoint.sh
# Install some basics dependencies
RUN apt-get update && \
apt-get install -y curl lsb-release software-properties-common gnupg2 vim && \
# Add User and Groups
addgroup --gid "$PGID" "$USER" && \
adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER" && \
# PHP
add-apt-repository ppa:ondrej/php && \
# Nodejs
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
NODE_MAJOR=21 && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
# Install packages
apt-get update && \
apt-get install -y \
ca-certificates \
apt-transport-https \
git \
unzip \
nginx-light \
openssl \
php8.3 \
php8.3-apcu \
php8.3-curl \
php8.3-pgsql \
php8.3-mysql \
php8.3-mbstring \
php8.3-gd \
php8.3-xml \
php8.3-zip \
php8.3-fpm \
php8.3-intl \
nodejs && \
corepack enable && \
#Install composer dependencies
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
# Set permissions
chmod +x /entrypoint.sh && \
mkdir /run/php
# Add nginx and PHP config files
COPY ./docker/default.conf /etc/nginx/nginx.conf
EXPOSE 80
WORKDIR /var/www/koillection
VOLUME /uploads
HEALTHCHECK CMD curl --fail http://localhost:80/ || exit 1
ENTRYPOINT ["sh", "/entrypoint.sh" ]
CMD [ "nginx" ]