Fork me on GitHub
#off-topic
<
2022-11-20
>
Ben Lieberman01:11:07

I feel quite spoiled by Intellij but how is this helpful?? thinking-face

respatialized15:11:09

"static types make your program easier to understand!"

šŸ˜† 3
vemv04:11:32

is it easy to have node mean in my PATH "run node from a global Docker image"? my intent is to keep not having node installed on my laptop, for security. But I also don't want to "dockerize" every other project. So I want kind of a drop-in replacement for the usual node binary. Maybe a tricky part is make it able to access target (i.e. cljs compilation output - which comes from a vanilla docker-less jvm) transparently, while restricting everything else by default?

Leaf Garland04:11:09

Not tried it but deno recently added a feature to import npm packages, and deno has lots of sandboxing/restrictions by default unlike node. Iā€™m curious to know if it could be used instead of node.

šŸ‘€ 1
Ivar Refsdal09:11:23

I've done something similar with az (azure cli):

$ cat az-docker 
#!/usr/bin/env bash

if [[ -z "${XDG_DATA_HOME}" ]]; then
  XDG_DATA_HOME="${HOME}/.xdg-data-home"
fi

if [ ! -d ${XDG_DATA_HOME}/docker-az ] ; then
  mkdir -p "${XDG_DATA_HOME}/docker-az"
fi

docker run -u $(id -u):$(id -g) -v ${XDG_DATA_HOME}/docker-az:/home/az -e HOME=/home/az --rm $DOCKER_OPTS  az "${@}"
and put that script on my $PATH Does that help? The important thing is to run with -u (user) and do some volume mapping (to target) I suppose

šŸ‘ 1
šŸ‘€ 1