-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·53 lines (44 loc) · 1 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
50
51
52
##
## @var $PHP_INI_DIR eg: /usr/local/etc/php
## @var $PHP_VERSION eg: 7.4.33
##
FROM php:8.2-cli
LABEL Version="0.1"
LABEL ImageName="WP_COMPOSER_REPO_php"
LABEL Author="Timur Kamaev (wp-kama.ru)"
RUN set -ex; \
echo 'alias ll="ls -l --color"' >> /etc/bash.bashrc; \
cp "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini";
RUN apt-get update; \
# Enable exit on error & debugging
set -ex; \
apt-get -y install \
libonig-dev \
libxml2-dev \
libzip-dev \
tree \
less \
unzip \
zip \
wget \
curl \
nano \
mc;
RUN docker-php-ext-install \
mbstring \
opcache \
exif \
intl \
zip;
RUN set -ex; \
# Install Composer. See: https://getcomposer.org/download
wget https://getcomposer.org/download/2.5.5/composer.phar \
&& chmod +x composer.phar \
&& mv composer.phar /usr/local/bin/composer;
# For correct access to container mounting volume
RUN usermod -u 1000 www-data; \
groupmod -g 1000 www-data; \
chown -R www-data:www-data /var/www;
WORKDIR /var/www/app
USER www-data
CMD [ "bash" ]