-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.cli
More file actions
59 lines (48 loc) · 1.35 KB
/
Dockerfile.cli
File metadata and controls
59 lines (48 loc) · 1.35 KB
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
53
54
55
56
57
58
59
ARG PHP_VERSION
ARG ALPINE_VERSION
FROM php:${PHP_VERSION}-cli-alpine${ALPINE_VERSION}
LABEL maintainer="Samusevich Alexander <archer.developer@gmail.com>"
ARG ENVIRONMENT=development
ARG COMPOSER_VERSION
# Packages
RUN apk update --update-cache && \
apk upgrade --available && \
apk --no-cache add \
bash \
openssh \
icu-dev \
zlib-dev \
libzip-dev \
libpng-dev \
libjpeg-turbo-dev \
freetype-dev \
oniguruma-dev \
libxml2-dev \
unzip \
git \
nano \
htop
# Install basic php extensions
RUN docker-php-ext-configure gd --with-freetype --with-jpeg && \
docker-php-ext-install -j$(nproc) \
gd \
pdo_mysql \
xml \
pcntl \
intl \
calendar \
bcmath \
zip
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer --version=${COMPOSER_VERSION}
RUN composer --version
# Use the default configuration according to environment
RUN mv "$PHP_INI_DIR/php.ini-${ENVIRONMENT}" "$PHP_INI_DIR/php.ini"
# Customize the default configuration according to environment
ADD ./php/php.ini-${ENVIRONMENT} "$PHP_INI_DIR/conf.d/custom.ini"
STOPSIGNAL SIGTERM
# Replace default entrypoint and cmd
CMD []
ADD ./entrypoint.cmd.sh /entrypoint.cmd.sh
RUN chmod +x /entrypoint.cmd.sh
WORKDIR /var/www/app