From 4557d9aef14a528a805baf474ba5f4ec27de9f03 Mon Sep 17 00:00:00 2001
From: Benjamin Loison <12752145+Benjamin-Loison@users.noreply.github.com>
Date: Thu, 19 Sep 2024 14:54:28 +0200
Subject: [PATCH] Fix #300: Add Protobuf support to Docker (#265)
---
Dockerfile | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Dockerfile b/Dockerfile
index 7b37789..a63733d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,4 +8,10 @@ COPY . /var/www/html/
# Replace `AllowOverride None` with `AllowOverride All` in `` in `/etc/apache2/apache2.conf`.
RUN sed -ri -e 'N;N;N;s/(\n)(.*\n)(.*)AllowOverride None/\1\2\3AllowOverride All/;p;d;' /etc/apache2/apache2.conf
+COPY --from=composer/composer:latest-bin /composer /usr/bin/composer
+RUN apt update
+RUN apt install -y git protobuf-compiler
+RUN composer require google/protobuf
+RUN protoc --php_out=proto/php/ --proto_path=proto/prototypes/ $(find proto/prototypes/ -type f)
+
CMD apachectl -D FOREGROUND