Use ubuntu jammy and cleanup Dockerfile

Signed-off-by: GitHub <noreply@github.com>
pull/37521/head
Robin Windey 2023-03-18 16:48:56 +07:00 committed by GitHub
parent 16c14c059d
commit 79fb336d35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 15 deletions

@ -1,13 +1,10 @@
FROM ubuntu:focal FROM ubuntu:jammy
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
# PHP # PHP
RUN apt-get update -y RUN apt-get update -y && \
apt install -y apache2 vim software-properties-common sudo nano
RUN apt install -y apache2 vim software-properties-common sudo nano
RUN add-apt-repository ppa:ondrej/php
RUN apt-get install --no-install-recommends -y \ RUN apt-get install --no-install-recommends -y \
php8.1 \ php8.1 \
@ -39,8 +36,8 @@ RUN apt-get install --no-install-recommends -y \
nodejs \ nodejs \
npm npm
RUN echo "xdebug.remote_enable = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini RUN echo "xdebug.remote_enable = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini && \
RUN echo "xdebug.remote_autostart = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini echo "xdebug.remote_autostart = 1" >> /etc/php/8.1/cli/conf.d/20-xdebug.ini
# Autostart XDebug for apache # Autostart XDebug for apache
RUN { \ RUN { \
@ -54,14 +51,14 @@ RUN apt-get -y install \
ca-certificates \ ca-certificates \
curl \ curl \
gnupg-agent \ gnupg-agent \
software-properties-common software-properties-common && \
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
RUN add-apt-repository \ add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \ $(lsb_release -cs) \
stable" stable" && \
RUN apt-get update -y apt-get update -y && \
RUN apt-get install -y docker-ce docker-ce-cli containerd.io apt-get install -y docker-ce docker-ce-cli containerd.io && \
RUN ln -s /var/run/docker-host.sock /var/run/docker.sock ln -s /var/run/docker-host.sock /var/run/docker.sock
WORKDIR /var/www/html WORKDIR /var/www/html