Skip to content

Instantly share code, notes, and snippets.

@warvariuc
Last active March 15, 2022 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warvariuc/470f71d121134d1d36d7ca0ac116f244 to your computer and use it in GitHub Desktop.
Save warvariuc/470f71d121134d1d36d7ca0ac116f244 to your computer and use it in GitHub Desktop.
Check environment variables passed to a docker container in cloud
root@4f2af8100e1f:# strings /proc/1/environ
PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=4f2af8100e1f
COMPUTERNAME=10-30-0-24
PLATFORM_VERSION=97.0.7.610
APPSVC_RUN_ZIP=FALSE
WEBSITE_SKU=LinuxFree
...
-------------------------------------------------------------------------------
Inject those variables in the current console
-------------------------------------------------------------------------------
root@4f2af8100e1f:# . <(xargs -0 bash -c 'printf "export %q\n" "$@"' -- < /proc/1/environ)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment