denoland/deno_docker

Bash function not working as intended from the documentation

Closed this issue · 0 comments

The documentation's example on how to use deno as a bash function is missing the entrypoint since running the current code snippet will fail as --version is not a known command inside the running container (because it lacks an entrypoint).

deno () {
  docker run \
    --interactive \
    --tty \
    --rm \
    --volume $PWD:/app \
    --volume $HOME/.deno:/deno-dir \
    --workdir /app \
    denoland/deno:1.10.3 \
    "$@"
}

Whereas this configuration will work.

deno () {
  docker run \
    --interactive \
    --tty \
    --rm \
    --volume $PWD:/app \
    --volume $HOME/.deno:/deno-dir \
    --workdir /app \
    --entrypoint deno \
    denoland/deno:1.10.3 \
    "$@"
}

Note the added --entrypoint deno line near the end of the bash function.