[HN Gopher] Cloud Run Quietly Swaps Home Env Var in Docker
___________________________________________________________________
Cloud Run Quietly Swaps Home Env Var in Docker
Author : chanind
Score : 23 points
Date : 2021-09-27 21:37 UTC (1 hours ago)
(HTM) web link (chanind.github.io)
(TXT) w3m dump (chanind.github.io)
| yzmtf2008 wrote:
| The solution here is to use `$XDG_CACHE_HOME` instead of
| `$HOME/.cache`, which may not be where a user wants their cache
| to live: https://specifications.freedesktop.org/basedir-
| spec/basedir-...
| remram wrote:
| $XDG_CACHE_HOME is usually not set, it is an override and
| software should default to $HOME/.cache.
|
| As per your link:
|
| > If $XDG_CACHE_HOME is either not set or empty, a default
| equal to $HOME/.cache should be used.
|
| So even if Huggingface is aware of that variable (and it
| probably is) that won't help at all.
| fwip wrote:
| Is that variable set to a consistent value at both build & run
| in Cloud Run?
| reilly3000 wrote:
| As an alternative, don't use root for Dockerfiles. Ever. It only
| takes a few lines to create a user, group, and use said user, and
| closes a whole class of security issues.
| sjtindell wrote:
| Closes security loopholes, increases operational burden (if
| only slightly). A tale as old as time.
___________________________________________________________________
(page generated 2021-09-27 23:00 UTC)