Skip to content

Instantly share code, notes, and snippets.

@johnjreiser
Created June 1, 2019 19:48
Show Gist options
  • Save johnjreiser/4ab472326d425eef9156f36e8d0dec20 to your computer and use it in GitHub Desktop.
Save johnjreiser/4ab472326d425eef9156f36e8d0dec20 to your computer and use it in GitHub Desktop.
Store container start time inside environment variable
export CONTAINER_START=$( stat /proc/1/cmdline | grep Modify | awk '{print $2 " " $3}' )
# run in shell through entrypoint or other cmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment