docker-oracle-sqlcl
docker-oracle-sqlcl copied to clipboard
Reference function rather than alias
aliases don't behave the same when running as bash scripts. This is especially true with multi line definitions of a docker run command. Instead use a bash function. Ex:
# Note the $@ passes in all args to the function
sqlcl() {
docker run -it --rm \
--network="host" \
-v `pwd`:/sqlcl \
-v ~/Documents/Oracle/:/oracle \
-e TNS_ADMIN=$TNS_ADMIN \
oracle-sqlcl:latest \
$@
}