docker-oracle-sqlcl icon indicating copy to clipboard operation
docker-oracle-sqlcl copied to clipboard

Reference function rather than alias

Open martindsouza opened this issue 5 years ago • 0 comments

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 \
    $@
}

martindsouza avatar Jun 05 '20 03:06 martindsouza