Skip to content

Instantly share code, notes, and snippets.

@zerkms
Last active January 5, 2023 11:52
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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