It can be a hussle to get this to work. Sharing is caring, so here you got my result.
Build the Docker image and run it. It should work as it is.
- Run
docker build -t gdal-oci .
- Run
docker run -it gdal-oci
- Run in container
ogr2ogr --formats | grep OCI
This should result in: OCI -vector- (rw+): Oracle Spatial
These are the steps I took to build GDAl with OCI driver:
- I took the ubuntu small Docker file from the GDAL github repo;
- I added the installation steps to install OCI to the Dockerfile based on fegyi001's repo;