coleifer / sqlite-web

Web-based SQLite database browser written in Python
MIT License
3.43k stars 339 forks source link

sqlite[+/- web] base image for arm/v7 #103

Closed cnaslain closed 2 years ago

cnaslain commented 2 years ago

Hi, I tried to run the docker image from a Raspberry Pi v4 (arch: linux/arm/v7) but the only available images in docker hub is for linux/amd64. I tried to build the docker image of the sqlite-web from the Raspberry Pi, but unfortunately the sqlite base (FROM coleifer/sqlite) is not available too for arm/v7 and I couldn't find the Dockerfile on GitHub to build it locally. Could you provide the source to build the coleifer/sqlite base layer required for coleifer/sqlite-web ? Regards, Chris

coleifer commented 2 years ago

This is probably old/outdated, but here:

FROM python:3.6
ENV CFLAGS="-DSQLITE_DEFAULT_CACHE_SIZE=-8000 \
            -DSQLITE_DEFAULT_FOREIGN_KEYS=1 \
            -DSQLITE_DEFAULT_MEMSTATUS=0 \
            -DSQLITE_DEFAULT_PAGE_SIZE=4096 \
            -DSQLITE_DEFAULT_SYNCHRONOUS=0 \
            -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=0 \
            -DSQLITE_DISABLE_DIRSYNC \
            -DSQLITE_ENABLE_COLUMN_METADATA \
            -DSQLITE_ENABLE_DESERIALIZE \
            -DSQLITE_ENABLE_FTS3 \
            -DSQLITE_ENABLE_FTS3_PARENTHESIS \
            -DSQLITE_ENABLE_FTS4 \
            -DSQLITE_ENABLE_FTS5 \
            -DSQLITE_ENABLE_JSON1 \
            -DSQLITE_ENABLE_MEMDB \
            -DSQLITE_ENABLE_STAT4 \
            -DSQLITE_ENABLE_STMTVTAB \
            -DSQLITE_ENABLE_UNLOCK_NOTIFY \
            -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
            -DSQLITE_LIKE_DOESNT_MATCH_BLOBS \
            -DSQLITE_MAX_EXPR_DEPTH=0 \
            -DSQLITE_SOUNDEX \
            -DSQLITE_STMTJRNL_SPILL=-1 \
            -DSQLITE_TEMP_STORE=3 \
            -DSQLITE_USE_ALLOCA \
            -DSQLITE_USE_URI \
            -DSQLITE_DEFAULT_WAL_AUTOCHECKPOINT=512 \
            -DHAVE_USLEEP \
            -O2 -fPIC"
RUN apt-get update && apt-get -y install tcl-dev wget && \
      wget https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release -O sqlite.tar.gz -q && \
      tar xzf sqlite.tar.gz && \
      cd sqlite && \
      LIBS="-lm" PREFIX="/usr/local" ./configure --disable-tcl --enable-static --enable-shared --enable-tempstore=always --prefix="/usr/local" && \
      make -j4 && \
      make install && \
      ldconfig && \
      cd ../ && \
      rm -rf ./sqlite/ ./sqlite.tar.gz
cnaslain commented 2 years ago

Thanks. I'll have a try. You should create a new repo to store this; it could be helpful to others who tries to build your web project ;-)