【发布时间】:2018-06-11 20:20:22
【问题描述】:
我有一个通过 docker 容器使用 maven 运行的 java 项目。我有一个指定本地环境变量的属性文件。但是,我想修改 java 中的环境变量,或者可能通过 maven pom.xml 或 docker file/docker compose。
我尝试使用
在 docker 文件中设置我的环境变量ENV new_env = old_env
format 但是当我运行 docker:run 时,它不起作用。这就是我得到的。
bc6cc4> Execute a program under the supervision of a valid init process (tini)
bc6cc4>
bc6cc4> Command line options:
bc6cc4>
bc6cc4> --version: Show version and exit.
bc6cc4> -h: Show this help message and exit.
bc6cc4> -s: Register as a process subreaper (requires Linux >= 3.4).
bc6cc4> -v: Generate more verbose output. Repeat up to 3 times.
bc6cc4> -g: Send signals to the child's process group.
bc6cc4> -l: Show license and exit.
bc6cc4>
bc6cc4> Environment variables:
bc6cc4>
bc6cc4> TINI_SUBREAPER: Register as a process subreaper (requires Linux >= 3.4)
bc6cc4> TINI_VERBOSITY: Set the verbosity level (default: 1)
bc6cc4>
在这些错误之后,我的项目刚刚停止,我不得不手动退出。有什么建议么?
【问题讨论】:
标签: java maven docker docker-compose dockerfile