forked from mklkj/php-node-composer-npm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (39 loc) · 1.38 KB
/
Dockerfile
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
FROM php:8.2
LABEL maintainer="[email protected]"
ENV DEPLOYER_VERSION=7.3.0
RUN apt-get update && apt-get install -y \
git \
jq \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmemcached-dev \
libpng-dev \
gnupg \
build-essential \
zip unzip \
zlib1g-dev \
rsync \
openssh-client
# node
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs
# update npm to last version
RUN npm i -g npm
# composer
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
&& curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \
&& php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" \
&& php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer --2.2 \
&& rm -f /tmp/composer-setup.*
RUN docker-php-source extract \
&& NPROC=$(getconf _NPROCESSORS_ONLN) \
&& docker-php-ext-install -j${NPROC} gd \
mysqli \
opcache \
pdo_mysql
RUN docker-php-source delete
# Install Deployer
COPY install_deployer.php /
RUN php /install_deployer.php
RUN rm /install_deployer.php
RUN composer global require deployer/recipes --dev