deno_docker
deno_docker copied to clipboard
Repurpose DENO_DIR to deno's user home
Would be better to change DENO_DIR
to use deno
's user home instead of /deno-dir/
?
Eventually, this is not an issue with the image, but something I'm facing with GitLab CI (and probably some other solutions) that it complains about caching folders outside the build
(or user's home) sub-directory.
What did you have to set DENO_DIR to for gitlab-ci?
The original file was like this:
default:
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- $DENO_DIR/
image: docker.io/hayd/alpine-deno:1.7.2 # https://hub.docker.com/r/hayd/alpine-deno/
stages:
- verify
format:
stage: verify
rules:
- if: $CI_COMMIT_BRANCH == "master"
- if: $CI_MERGE_REQUEST_ID
script:
- deno fmt --check
Removing the cache
key it's all I needed to remove the warnings and make the pipeline works without failing. I think setting DENO_DIR
to /home/deno/.cache/deno
(the defaults) makes sense and should probably fix this.
cc @lucacasonato for an opinion on this one.
Hello folks...any progress on this one?
This makes sense to me, especially now that we store origin data (localStorage
) in DENO_DIR.
OK...that would be great then! 🥂
Question:
The README suggests to mount --volume $HOME/.deno:/deno-dir
. On my $HOME/.deno, I only see the folder bin
, even though I have some things cached already. So, what's the use case of --volume $HOME/.deno:/deno-dir
?
BTW, @x80486 you can set the DENO_DIR
environment variable to be whatever you want, as a folder inside of the HOME if you prefer.
It does not make sense to set the default value for DENO_DIR
inside the container to be /home/deno/.deno/cache
, as the container can be run as not only deno
, but root
as well.