Dockerfile
authorMichael Wallner <mike@php.net>
Wed, 5 Jan 2022 15:22:49 +0000 (16:22 +0100)
committerMichael Wallner <mike@php.net>
Wed, 5 Jan 2022 15:31:05 +0000 (16:31 +0100)
docker build --tag m6w6/php-ion . && \
docker run --rm m6w6/php-ion -r 'var_dump(ion\unserialize("123d0"));'

Dockerfile [new file with mode: 0644]

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..c1d45a1
--- /dev/null
@@ -0,0 +1,17 @@
+FROM php:8.1-cli
+
+RUN apt-get update -qy \
+    && DEBIAN_FRONTEND=noninteractive \
+    apt-get install -qy cmake git \
+    && rm -rf /var/lib/apt/lists/*
+
+WORKDIR /tmp
+COPY . ion/
+RUN cd ion && \
+    phpize && \
+    ./configure && \
+    make clean && \
+    make -j $(nproc) && \
+    make install INSTALL=install && \
+    docker-php-ext-enable ion && \
+    rm -rf /tmp/ion