Live data from Hacker News

Cloud Run quietly swaps HOME env var in Docker

chanind.github.io

31–33 of 33 posts

Re: Cloud Run quietly swaps HOME env var in Docker

#31

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.

Why some people do it: there are problems with bind mounts when using a non privileged user inside of a container. Not only that, but many containers either don't have instructions for running with custom users, make bad assumptions about what users will be used (chmod/chown) or even will have cryptic error messages when you try to run them with custom users. In short, it's a pain for the average person just trying t…

All fair points! Docker could certainly make it easier, and it sounds like Cloud Run could do better to accommodate this type of case. AFAIK these type of issues have been the main motivator for the creation of alternative container runtimes such as Podman.

Re: Cloud Run quietly swaps HOME env var in Docker

#32

Earlier quoted context omitted.

I feel that employees from big Corp sometimes can't do good. If they respond here, it should be as you mentioned. They are monitoring media on mentions. If they don't, people can't fix their issues ( probably ) as fast. But responding here gives the observing effect of having a higher priority. Which is sometimes "ridiculed" ( don't know a better describing term) Either way, thanks to the PM for an update about this.

I guess the main problem is the second part of the subOP comment: >While you're at it, if there is a way you can get the Google Identity Platform PM to let us know when some form of multi-factor auth besides SMS will be supported, that would be great! When they respond they get inundated with random requests and ailments that they have exactly zero control on.

You're absolutely correct.

Re: Cloud Run quietly swaps HOME env var in Docker

#33
post #29

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.

Can confirm, using a non-root user also solves the issue (which I should have been doing anyway). It guess Cloud Run assumes $HOME is set to /home/something and since root uses /root it gets confused?

Thanks for confirming! I was starting to doubt myself a bit after some of the other responses.
Post reply on HN