fix(agent): run container as non-root
This commit is contained in:
1 parent
75a09aaf9a
commit
8ebb231c17
5 files changed
+46
-2
No files matched your search
@@ -62,6 +62,7 @@
|
||||
image: eltruncho/heimdall-agent:latest
|
||||
container_name: heimdall-agent-{{safeName}}
|
||||
restart: unless-stopped
|
||||
user: "1654:1654"
|
||||
environment:
|
||||
Agent__CentralUrl: {{CentralUrl}}
|
||||
Agent__SiteToken: {{SiteToken}}
|
||||
@@ -70,6 +71,9 @@
|
||||
Agent__StateDirectory: /var/lib/heimdall
|
||||
volumes:
|
||||
- agent_state:/var/lib/heimdall
|
||||
depends_on:
|
||||
agent-state-init:
|
||||
condition: service_completed_successfully
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/healthz"]
|
||||
interval: 30s
|
||||
@@ -77,6 +81,14 @@
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
|
||||
agent-state-init:
|
||||
image: eltruncho/heimdall-agent:latest
|
||||
user: "0:0"
|
||||
entrypoint: ["chown", "-R", "1654:1654", "/state"]
|
||||
volumes:
|
||||
- agent_state:/state
|
||||
restart: "no"
|
||||
|
||||
volumes:
|
||||
agent_state:
|
||||
""";
|
||||
|
||||
Reference in new issue
Block a user