1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

Add docker files for dev environment (#424)

This commit is contained in:
Eli Barbosa
2025-06-05 19:42:52 -07:00
committed by GitHub
parent ff005f6edc
commit bdabc9b6ba
3 changed files with 40 additions and 0 deletions

1
.gitignore vendored
View File

@@ -26,3 +26,4 @@ composer.lock
*.orig
*.bak
core
.idea

30
Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
FROM ubuntu:24.04
ARG DEBIAN_FRONTEND=noninteractive
ENV PHP_VERSION="8.4"
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN apt update -y && apt -y install git curl locales doxygen software-properties-common
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 \
RUN echo -y | add-apt-repository ppa:ondrej/php && apt update -y
RUN apt install -y \
php${PHP_VERSION} \
php${PHP_VERSION}-dev \
php${PHP_VERSION}-xdebug \
php${PHP_VERSION}-iconv \
php${PHP_VERSION}-bcmath \
php${PHP_VERSION}-tidy \
php${PHP_VERSION}-xml
RUN echo "xdebug.mode=debug,coverage" >> /etc/php/${PHP_VERSION}/cli/php.ini
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /opt/htmlpurifier

9
docker-compose.yaml Normal file
View File

@@ -0,0 +1,9 @@
services:
htmlpurifier:
build:
context: "."
dockerfile: Dockerfile
container_name: 'htmlpurifier'
tty: true
volumes:
- .:/opt/htmlpurifier