Skip to content

Commit 101c471

Browse files
committed
Add a Dockerfile for playing with Wasm user-defined functions
The Dockerfile can be used to build a container with precompiled sqlite3 shell inside, with WebAssembly user-defined function support.
1 parent 4fc6455 commit 101c471

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Dockerfile-wasm-udf

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This Dockerfile can be used to test the WebAssembly udf build
2+
# of libSQL.
3+
# Build with `docker build -t libsql-wasm-udf -f Dockerfile-wasm-udf`
4+
# Run e.g. with `docker run -it libsql-wasm-udf`
5+
# or with `docker run -it -v.:/home/libsql/playground libsql-wasm-udf ./sqlite3 playground/db.sql`
6+
# for an interactive session with the database being preserved on host in the db.sql file.
7+
8+
FROM rust:slim-buster
9+
10+
WORKDIR /home/libsql
11+
ADD src src
12+
ADD ext ext
13+
ADD tool tool
14+
15+
RUN apt-get update
16+
RUN apt-get install -y tcl8.6-dev build-essential autoconf
17+
18+
#I'm sorry for that
19+
RUN ln -s /bin/grep /usr/bin/grep
20+
RUN ln -s /bin/sed /usr/bin/sed
21+
RUN ln -sf /bin/bash /bin/sh
22+
23+
COPY manifest manifest.uuid VERSION configure.ac Makefile.in \
24+
libtool sqlite3.pc.in sqlite_cfg.h.in install-sh config.guess config.sub ltmain.sh .
25+
26+
RUN autoconf
27+
RUN ./configure --enable-wasm-runtime
28+
RUN make sqlite3

0 commit comments

Comments
 (0)