Life hack: don’t install an instant client out of habit, use the Database Free image!

I’m currently writing a small bash script to load a few WebAssembly modules into an Oracle AI Autonomous Database, configured with mutual TLS encryption. In other words, you need a wallet to connect to it.

SQL Loader is a natural fit for loading a few discrete items into the database but … I don’t have any Oracle client software installed at all. And yes, I’m aware of the alternatives for ADB, but none of them t provides such a nice background story for this post 😀

What I do have available is an Oracle Free container image! The image ships with sqlldr so why not use it? It’s actually quite straight forward! If you haven’t already, download the wallet and unzip it to your project directory. I unzipped it into tns, and added this directory to my .gitignore

The next step is to start the container image:

Shell
docker run --rm --interactive --tty \
--name sqlldr \
--entrypoint bash \
--volume $(pwd):/mle-wasm-photon \
--volume $(pwd)/tns:/opt/oracle/product/26ai/dbhomeFree/network/admin \
ghcr.io/gvenzl/oracle-free:23.26.3

This command starts an interactive container session in bash, and best of all, it’s super quick to initialise. Normally, when using this particular image, you’d expect a database to be created/mounted. Changing the entrypoint to bash skips that step, and I’m presented with all the database utilities in my path. The first volume mount, /mle-wasm-photon, makes the contents of the host directory available within the container. The second one places the host’s tns directory into $ORACLE_HOME/network/admin, the default location. This is done on purpose to avoid having to make any changes.

Podman users (rootless) on Linux might have to amend the command with options to map host to container uids and gids, like --userns=keep-id:uid=n,gid=n.

Now let’s load the files into the database. Still attached to the tty session, start sqlldr

$ sqlldr userid=emily@demo_tp control=load_photon.ctl log=logs/20261027_200516_load_photon.log direct=false
[...]
SQL*Loader: Release 23.26.3.0.0 - Production on Tue Oct 27 20:03:50 2026
Version 23.26.3.0.0
Copyright (c) 1982, 2026, Oracle and/or its affiliates. All rights reserved.
Path used: Conventional
Commit point reached - logical record count 1
Commit point reached - logical record count 2
Table WASM_MODULES:
2 Rows successfully loaded.
Check the log file:
logs/20261027_200516_load_photon.log
for more information about the load.

It only takes a second to load the files: Job Done!