Skip to content

Commit 62d47bd

Browse files
committed
Add Dockerfile
1 parent c428c4d commit 62d47bd

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
ARG UNIT_VERSION=1.30.0
2+
ARG PHP_VERSION=8.2
3+
FROM unit:${UNIT_VERSION}-php${PHP_VERSION}
4+
5+
ARG UID=1000
6+
ARG GID=1000
7+
ENV UID=${UID}
8+
ENV GID=${GID}
9+
10+
RUN apt-get -y update \
11+
&& apt-get -y install git
12+
13+
# PHP Extensions
14+
ADD https://github.com/mlocati/docker-php-extension-installer/releases/download/2.1.34/install-php-extensions /usr/local/bin/
15+
RUN chmod +x /usr/local/bin/install-php-extensions && \
16+
install-php-extensions gd curl intl json mbstring pgsql pdo_pgsql redis zip opcache bcmath
17+
18+
# Composer
19+
ADD https://getcomposer.org/installer /tmp/composer
20+
RUN php /tmp/composer --install-dir=/usr/bin --filename=composer
21+
22+
RUN usermod -u $UID www-data \
23+
&& groupmod -g $GID www-data
24+
25+
LABEL org.opencontainers.image.source="https://github.com/s-shiryaev/nginx-unit-php"
26+
LABEL org.opencontainers.image.documentation="https://github.com/s-shiryaev/nginx-unit-php"
27+
LABEL org.opencontainers.image.authors="Sergey Shiryaev <[email protected]>"
28+
LABEL org.opencontainers.image.version=$PHP_VERSION
29+
30+
WORKDIR /var/www/html
31+
32+
CMD ["unitd", "--no-daemon"]

0 commit comments

Comments
 (0)