-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
49 lines (40 loc) · 1.47 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
ARG UBUNTU_RELEASE_NAME=jammy
FROM ubuntu:${UBUNTU_RELEASE_NAME}
ARG PHP_VERSION=8.2
ARG UBUNTU_RELEASE_NAME=jammy
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
RUN \
apt-get update && \
apt-get dist-upgrade -y && \
apt-get install gnupg ca-certificates -y && \
rm -rf /var/lib/apt/lists/*
RUN \
echo "deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ ${UBUNTU_RELEASE_NAME} main" | tee /etc/apt/sources.list.d/ondrej-ubuntu-php-${UBUNTU_RELEASE_NAME}.list && \
mkdir ~/.gnupg && chmod 0700 $_ && \
gpg --no-default-keyring --keyring /usr/share/keyrings/ondrej-ubuntu-php.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C && \
sed -i 's/deb /deb \[signed\-by=\/usr\/share\/keyrings\/ondrej-ubuntu-php.gpg\] /' /etc/apt/sources.list.d/ondrej-ubuntu-php-${UBUNTU_RELEASE_NAME}.list && \
apt-get update && \
rm -rf /var/lib/apt/lists/*
RUN \
apt-get update && apt-get install -y \
php${PHP_VERSION}-curl \
php${PHP_VERSION}-xml \
php${PHP_VERSION}-xmlrpc \
php${PHP_VERSION}-memcache \
php${PHP_VERSION}-memcached \
php${PHP_VERSION}-mysql \
php${PHP_VERSION}-gd \
php${PHP_VERSION}-mbstring \
php${PHP_VERSION}-cli \
php${PHP_VERSION}-opcache \
php${PHP_VERSION}-redis \
php${PHP_VERSION}-bcmath \
php${PHP_VERSION}-soap \
php${PHP_VERSION}-zip \
php${PHP_VERSION}-intl \
php${PHP_VERSION}-imagick \
imagemagick && \
rm -rf /var/lib/apt/lists/*
USER www-data
CMD ["php"]