Files
docker/hidche/app/Dockerfile
T
Hide_D 20593bdcf4 php_with_node (#3)
PHP8 + NodeJS + Debian Bullseye

Co-authored-by: Hide_D <hided62@gmail.com>
Reviewed-on: https://storage.hided.net/gitea/devsam/docker/pulls/3
Co-authored-by: hide_d <hided62@gmail.com>
Co-committed-by: hide_d <hided62@gmail.com>
2021-09-09 23:33:10 +09:00

62 lines
1.7 KiB
Docker

FROM php:8.0-fpm-bullseye
#debian
ENV LC_ALL=C.UTF-8
RUN apt -y update ;\
apt -y install \
bzip2 git rsync \
libmemcached-dev libcurl4-openssl-dev libmcrypt-dev \
libicu-dev libjpeg-dev libpng-dev libwebp-dev libfreetype6-dev \
libzip-dev libxml2-dev libsqlite3-dev gosu build-essential;
RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr; \
docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd; \
docker-php-ext-configure mysqli --with-mysqli=mysqlnd; \
docker-php-ext-install -j "$(nproc)" \
exif \
gd \
intl \
opcache \
pcntl \
pdo_mysql \
mysqli \
zip;
RUN pecl install memcached mcrypt;
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt install -yq nodejs
RUN npm install -g npm
#from nextcloud setting
RUN mkdir -p /var/www/html/; \
mkdir -p /var/www/.ssh;
COPY entrypoint.sh /usr/local/bin/
COPY id_ecdsa known_hosts /var/www/.ssh/
VOLUME /var/www/html
ARG UID=33
ARG GID=33
RUN if [ "$UID" != 33 ]; then \
usermod -u $UID -o www-data; \
fi; \
if [ "$GID" != 33 ]; then \
groupmod -g $GID -o www-data; \
fi; \
echo $UID > /var/tmp.txt ; \
chmod +x /usr/local/bin/entrypoint.sh; \
mkdir -p /var/www/opcache; \
chown -R www-data:www-data /var/www; \
chmod -R g=u /var/www; \
mkdir -p /var/www/.ssh; \
chown www-data:www-data /var/www/.ssh; \
chmod 700 /var/www/.ssh; \
chmod 600 /var/www/.ssh/*;
COPY sam_conf.ini /usr/local/etc/php/conf.d/sam_conf.ini
ENTRYPOINT ["entrypoint.sh"]
CMD ["php-fpm"]