2022-03-12 18:37:47 +00:00
|
|
|
FROM php:8.0-fpm AS rootless
|
2016-01-09 13:47:32 +00:00
|
|
|
|
2022-03-12 18:37:47 +00:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
ARG NODE_VERSION=14
|
|
|
|
|
|
|
|
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 12:31:53 +00:00
|
|
|
|
2016-01-09 13:47:32 +00:00
|
|
|
RUN apt-get update && apt-get install -y \
|
2019-06-19 12:54:38 +00:00
|
|
|
libmcrypt-dev \
|
|
|
|
libicu-dev \
|
|
|
|
libpq-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
libpng-dev \
|
|
|
|
libjpeg-dev \
|
|
|
|
libsqlite3-dev \
|
|
|
|
imagemagick \
|
2019-07-06 20:03:40 +00:00
|
|
|
libmagickwand-dev \
|
2019-10-27 18:04:04 +00:00
|
|
|
libtidy-dev \
|
2022-03-12 18:37:47 +00:00
|
|
|
libonig-dev \
|
|
|
|
libzip-dev \
|
|
|
|
libfreetype6-dev \
|
|
|
|
zlib1g-dev \
|
|
|
|
git \
|
|
|
|
build-essential \
|
|
|
|
nodejs
|
|
|
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
|
|
|
|
RUN docker-php-ext-install -j "$(nproc)" \
|
|
|
|
bcmath \
|
2019-10-27 18:04:04 +00:00
|
|
|
gd \
|
2022-03-12 18:37:47 +00:00
|
|
|
gettext \
|
|
|
|
iconv \
|
2019-06-19 12:54:38 +00:00
|
|
|
intl \
|
2022-03-12 18:37:47 +00:00
|
|
|
mbstring \
|
|
|
|
opcache \
|
2019-06-19 12:54:38 +00:00
|
|
|
pdo \
|
|
|
|
pdo_mysql \
|
|
|
|
pdo_pgsql \
|
2019-07-06 20:03:40 +00:00
|
|
|
pdo_sqlite \
|
2019-10-27 18:04:04 +00:00
|
|
|
sockets \
|
|
|
|
tidy \
|
|
|
|
zip
|
2019-06-19 12:54:38 +00:00
|
|
|
|
2022-03-12 18:37:47 +00:00
|
|
|
RUN pecl install redis; \
|
|
|
|
pecl install imagick; \
|
|
|
|
pecl install xdebug; \
|
|
|
|
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-04-04 12:02:13 +00:00
|
|
|
COPY --from=composer:2.2.10 /usr/bin/composer /usr/local/bin/composer
|
2022-03-12 18:37:47 +00: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 04:47:58 +00:00
|
|
|
/var/www/html/data/db \
|
2022-03-12 18:37:47 +00: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 13:47:32 +00:00
|
|
|
|
2022-03-12 18:37:47 +00:00
|
|
|
ARG USER_UID=1000
|
|
|
|
ARG USER_GID=1000
|
2016-02-25 20:56:33 +00:00
|
|
|
|
2022-03-12 18:37:47 +00: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 13:47:32 +00:00
|
|
|
|
2022-03-12 18:37:47 +00:00
|
|
|
USER www-data
|