2023-07-22 19:16:32 +02:00
|
|
|
FROM php:8.1-fpm AS rootless
|
2016-01-09 14:47:32 +01:00
|
|
|
|
2022-03-12 19:37:47 +01:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2023-12-27 23:00:49 +01:00
|
|
|
ARG NODE_VERSION=20
|
2022-03-12 19:37:47 +01:00
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
gnupg \
|
|
|
|
lsb-release \
|
|
|
|
openssl \
|
|
|
|
software-properties-common
|
|
|
|
|
|
|
|
RUN curl 'https://deb.nodesource.com/gpgkey/nodesource.gpg.key' | apt-key add - \
|
|
|
|
&& echo "deb https://deb.nodesource.com/node_${NODE_VERSION}.x $(lsb_release -cs) main" > /etc/apt/sources.list.d/nodesource.list
|
2016-03-02 13:31:53 +01:00
|
|
|
|
2016-01-09 14:47:32 +01:00
|
|
|
RUN apt-get update && apt-get install -y \
|
2019-06-19 14:54:38 +02:00
|
|
|
libmcrypt-dev \
|
|
|
|
libicu-dev \
|
|
|
|
libpq-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
libpng-dev \
|
|
|
|
libjpeg-dev \
|
2022-05-03 07:06:15 +02:00
|
|
|
libwebp-dev \
|
2019-06-19 14:54:38 +02:00
|
|
|
libsqlite3-dev \
|
|
|
|
imagemagick \
|
2019-07-06 22:03:40 +02:00
|
|
|
libmagickwand-dev \
|
2019-10-27 19:04:04 +01:00
|
|
|
libtidy-dev \
|
2022-03-12 19:37:47 +01:00
|
|
|
libonig-dev \
|
|
|
|
libzip-dev \
|
|
|
|
libfreetype6-dev \
|
|
|
|
zlib1g-dev \
|
|
|
|
git \
|
|
|
|
build-essential \
|
2023-12-27 23:00:49 +01:00
|
|
|
nodejs
|
2022-05-03 07:06:15 +02:00
|
|
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp
|
2022-03-12 19:37:47 +01:00
|
|
|
RUN docker-php-ext-install -j "$(nproc)" \
|
|
|
|
bcmath \
|
2019-10-27 19:04:04 +01:00
|
|
|
gd \
|
2022-03-12 19:37:47 +01:00
|
|
|
gettext \
|
|
|
|
iconv \
|
2019-06-19 14:54:38 +02:00
|
|
|
intl \
|
2022-03-12 19:37:47 +01:00
|
|
|
mbstring \
|
|
|
|
opcache \
|
2019-06-19 14:54:38 +02:00
|
|
|
pdo \
|
|
|
|
pdo_mysql \
|
|
|
|
pdo_pgsql \
|
2019-07-06 22:03:40 +02:00
|
|
|
pdo_sqlite \
|
2019-10-27 19:04:04 +01:00
|
|
|
sockets \
|
|
|
|
tidy \
|
|
|
|
zip
|
2019-06-19 14:54:38 +02:00
|
|
|
|
2022-03-12 19:37:47 +01:00
|
|
|
RUN pecl install redis; \
|
|
|
|
pecl install imagick; \
|
2022-12-22 12:30:34 +01:00
|
|
|
pecl install xdebug-3.1.6; \
|
2022-03-12 19:37:47 +01:00
|
|
|
docker-php-ext-enable \
|
|
|
|
redis \
|
|
|
|
imagick \
|
|
|
|
xdebug \
|
|
|
|
;
|
|
|
|
|
|
|
|
RUN npm install -g yarn
|
|
|
|
|
|
|
|
RUN curl -L -o /usr/local/bin/envsubst https://github.com/a8m/envsubst/releases/download/v1.1.0/envsubst-`uname -s`-`uname -m`; \
|
|
|
|
chmod +x /usr/local/bin/envsubst
|
|
|
|
|
2022-05-21 23:46:49 +02:00
|
|
|
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
|
2022-03-12 19:37:47 +01:00
|
|
|
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
|
|
COPY config/ /opt/wallabag/config/
|
|
|
|
|
|
|
|
RUN mkdir -p \
|
|
|
|
/var/www/html/app/config/ \
|
|
|
|
/var/www/html/var/cache \
|
|
|
|
/var/www/html/web/assets \
|
|
|
|
/var/www/html/data \
|
2022-05-03 06:47:58 +02:00
|
|
|
/var/www/html/data/db \
|
2022-03-12 19:37:47 +01:00
|
|
|
/var/www/.cache
|
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
CMD ["php", "bin/console", "--env=dev", "server:run", "0.0.0.0:8000"]
|
|
|
|
|
|
|
|
FROM rootless AS default
|
2016-01-09 14:47:32 +01:00
|
|
|
|
2022-03-12 19:37:47 +01:00
|
|
|
ARG USER_UID=1000
|
|
|
|
ARG USER_GID=1000
|
2016-02-25 21:56:33 +01:00
|
|
|
|
2022-03-12 19:37:47 +01:00
|
|
|
RUN groupmod -g 1000 www-data ; \
|
|
|
|
usermod -u ${USER_UID} -g www-data www-data ; \
|
|
|
|
touch /usr/local/etc/php/conf.d/wallabag-php.ini \
|
|
|
|
/var/www/.yarnrc ; \
|
|
|
|
chown -R www-data: /var/www/html \
|
|
|
|
/usr/local/etc/php/conf.d/wallabag-php.ini \
|
|
|
|
/var/www/.cache \
|
|
|
|
/var/www/.yarnrc
|
2016-01-09 14:47:32 +01:00
|
|
|
|
2022-03-12 19:37:47 +01:00
|
|
|
USER www-data
|