Store environment variable within tmpfs

Viewed 54

Is it possible to store an environment variable from an .env file directly and secure (without showing up in docker inspect to a tmpfs storage?

version: "3"

services:
  app:
    build:
       context: .
    tmpfs:
     - /var/tmp
    command: "echo \"${SECRET}\" > /var/tmp/test.txt && ./app -c /var/tmp/test.txt"

My current approach leads to the container restarting itself over and over again.

0 Answers
Related