Docker builder for Sandbox lib
Doesn't support App yet
How to use
Create a directory, then clone ar_sandbox_lib, ar_sandbox_python and this repository in it, then cd into sandbox_docker-builder
sandbox/
|── ar_sandbox_lib/
| ├── build/
| └── ...
|── ar_sandbox_python/
| ├── build/
| └── ...
└── sandbox_docker-builder/
├── Dockerfile
├── docker-compose.yml
└── ...
The docker container will bind the parent folder (sandbox
) as a volume mounted on /src inside the container.
Build the Docker container :
$ docker-compose build
You may then use the provided Makefile
, or use the docker directly to build the lib.
Build Output
The build artifacts will be available inside the ./build/ directory.
sandbox_docker-builder/
├── build/
| ├── lib/
| | └── libsandbox.so.A.B.C
| └── wrapper/
| ├── shared_lib/
| | └── python_wrapper.[...].so
| ├── ar_sandbox-X.Y.Z-py3-none-any.whl
| └── ar_sandbox-X.Y.Z.tar.gz
└── ...
libsandbox.so and libsandbox.so.A should be symlinked to libsandbox.so.A.B.C and made available to LD to correctly use the python wheel.
Makefile
The provided makefile allow simple manipulation of the docker to build, clean and create the container.
Available targets :
Target | Command | What it does |
---|---|---|
create | make create |
Build the docker container |
build (default) |
make or make build
|
Build everything |
clean | make clean |
Cleanup |
docs | make docs |
Build the documentation for the python wrapper (Lib and wrapper must be built beforehand) |
Docker container
To use the docker container, use the following command :
$ docker-compose run sandbox_builder [ARGS]
If [ARGS]
is omitted, the container will build everything.
The following arguments are available :
Arg | Description |
---|---|
build [lib] [wrapper] |
Will build the indicated component. wrapper should be built after lib . If none provided, build everything. |
docs [mode] [opts] |
Build the wrapper documentation using sphinx-build. Everything must be already built. You may override mode (default to html .). You may override the sphinx-build options by passing opts which are relayed to the sphinx-build command. To provide opts , mode must be set. |
clean [lib] [wrapper] |
Will cleanup the build directories. If no component provided, clean everything. |
bash or s
|
Execute a bash terminal inside the docker. May or may not be useful. |
exec CMD [ARGS] or c [CMD] [ARGS]
|
Execute the command CMD with the arguments ARGS inside the docker. May or may not be useful. |