From bdabc9b6ba5cfe0bc937a67cf31a382c0ae98512 Mon Sep 17 00:00:00 2001 From: Eli Barbosa Date: Thu, 5 Jun 2025 19:42:52 -0700 Subject: [PATCH] Add docker files for dev environment (#424) --- .gitignore | 1 + Dockerfile | 30 ++++++++++++++++++++++++++++++ docker-compose.yaml | 9 +++++++++ 3 files changed, 40 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/.gitignore b/.gitignore index 553f454d..37aef8fb 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ composer.lock *.orig *.bak core +.idea diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..6d5cc5a5 --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 00000000..1f5aecec --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,9 @@ +services: + htmlpurifier: + build: + context: "." + dockerfile: Dockerfile + container_name: 'htmlpurifier' + tty: true + volumes: + - .:/opt/htmlpurifier