forked from tursodatabase/libsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |