Skip to content

Instantly share code, notes, and snippets.

@zerkms
Last active January 5, 2023 11:52
Show Gist options
  • Save zerkms/916cbe1a7714b4feead487dfb8e1e97d to your computer and use it in GitHub Desktop.
Save zerkms/916cbe1a7714b4feead487dfb8e1e97d to your computer and use it in GitHub Desktop.
FROM php:7.2.19-cli
RUN set -eux; \
apt update; \
apt install --no-install-recommends unzip; \
rm -rf /var/lib/apt/lists/*; \
cd /usr/src; \
curl -o sqlite.zip https://www.sqlite.org/2017/sqlite-preprocessed-3200100.zip; \
unzip sqlite.zip; \
rm sqlite.zip; \
cd sqlite-preprocessed-3200100; \
gcc -shared rtree.c -fPIC -o librtree.so; \
mv librtree.so /usr/lib/x86_64-linux-gnu
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"; \
echo "sqlite3.extension_dir=/usr/lib/x86_64-linux-gnu" > "$PHP_INI_DIR/conf.d/sqlite.ini"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment