Skip to content

Commit

Permalink
Add a Dockerfile for playing with Wasm user-defined functions
Browse files Browse the repository at this point in the history
The Dockerfile can be used to build a container with precompiled
sqlite3 shell inside, with WebAssembly user-defined function support.
  • Loading branch information
psarna committed Nov 18, 2022
1 parent 4fc6455 commit 101c471
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Dockerfile-wasm-udf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This Dockerfile can be used to test the WebAssembly udf build
# of libSQL.
# Build with `docker build -t libsql-wasm-udf -f Dockerfile-wasm-udf`
# Run e.g. with `docker run -it libsql-wasm-udf`
# or with `docker run -it -v.:/home/libsql/playground libsql-wasm-udf ./sqlite3 playground/db.sql`
# for an interactive session with the database being preserved on host in the db.sql file.

FROM rust:slim-buster

WORKDIR /home/libsql
ADD src src
ADD ext ext
ADD tool tool

RUN apt-get update
RUN apt-get install -y tcl8.6-dev build-essential autoconf

#I'm sorry for that
RUN ln -s /bin/grep /usr/bin/grep
RUN ln -s /bin/sed /usr/bin/sed
RUN ln -sf /bin/bash /bin/sh

COPY manifest manifest.uuid VERSION configure.ac Makefile.in \
libtool sqlite3.pc.in sqlite_cfg.h.in install-sh config.guess config.sub ltmain.sh .

RUN autoconf
RUN ./configure --enable-wasm-runtime
RUN make sqlite3

0 comments on commit 101c471

Please sign in to comment.