add docker build and instructions
This commit is contained in:
parent
c0e93e5e27
commit
fd696a87d4
10
.dockerignore
Normal file
10
.dockerignore
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
README.md
|
||||||
|
LICENSE
|
||||||
|
.pre-commit-config.yaml
|
||||||
|
.gitignore
|
||||||
|
.clang-format
|
||||||
|
examples
|
||||||
|
Dockerfile
|
||||||
|
build
|
||||||
|
builddir
|
||||||
|
out
|
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
FROM ubuntu:22.04 AS build-prep
|
||||||
|
RUN apt update && apt upgrade -y
|
||||||
|
RUN apt install -y llvm clangd meson ninja-build pkg-config libsqlite3-dev doxygen graphviz wget unzip
|
||||||
|
WORKDIR /obelisk
|
||||||
|
COPY . .
|
||||||
|
RUN ./sqlite.sh
|
||||||
|
|
||||||
|
FROM build-prep AS build-machine
|
||||||
|
RUN meson --prefix=/usr build
|
||||||
|
RUN cd build && ninja -v
|
||||||
|
|
||||||
|
FROM build-machine AS build-machine-intermediate
|
||||||
|
RUN cd /obelisk/build/src/lib && rm -rf *.h *.p models
|
||||||
|
|
||||||
|
FROM scratch AS obelisk
|
||||||
|
COPY --from=build-machine-intermediate /obelisk/build/src /bin/
|
||||||
|
COPY --from=build-machine-intermediate /obelisk/build/src/lib /lib/
|
||||||
|
COPY --from=build-machine-intermediate /obelisk/build/doc/man /man/
|
||||||
|
COPY --from=build-machine-intermediate /obelisk/build/doc/html /doc/
|
||||||
|
ENTRYPOINT [ "/bin/obelisk" ]
|
||||||
|
|
||||||
|
FROM scratch AS binaries
|
||||||
|
COPY --from=obelisk /bin/obelisk /bin/
|
||||||
|
COPY --from=obelisk /lib /lib/
|
||||||
|
COPY --from=obelisk /man /man/
|
||||||
|
COPY --from=obelisk /doc /doc/
|
10
README.md
10
README.md
@ -13,6 +13,8 @@ The Obelisk project is a declarative language designed to help with the implemen
|
|||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
|
### Normal build
|
||||||
|
|
||||||
```
|
```
|
||||||
./sqlite.sh
|
./sqlite.sh
|
||||||
meson builddir
|
meson builddir
|
||||||
@ -24,6 +26,14 @@ This process will generate the binary "obelisk", a shared library "libobelisk.so
|
|||||||
|
|
||||||
The binary is used to compile and create obelisk knowledge bases and the the libraries can be linked against to consult the Obelisk knowledge base from any software that can link with the libraries.
|
The binary is used to compile and create obelisk knowledge bases and the the libraries can be linked against to consult the Obelisk knowledge base from any software that can link with the libraries.
|
||||||
|
|
||||||
|
### Build in docker image
|
||||||
|
|
||||||
|
```
|
||||||
|
docker build ./ --output=out
|
||||||
|
```
|
||||||
|
|
||||||
|
This will create a directory called out which will contain the binaries, libraries, and generated documentation.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user