Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/docker_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,14 @@ def create_container(
self._check_image_existence(image_name=image)

endpoint_config = EndpointConfig(version="1.44", ipv4_address=host_address)
try:

volumes = {
"/var/log/commands.log": {'bind': '/var/log/commands.log', 'mode': 'rw'}
#"/path/to/host/private_file": {"bind": "/wazuh-agent/commands.log", "mode": "rw"}
}
environment["ENV_CONTAINER_NAME"] = container_name

try:
container = self.client.containers.run(
image,
detach=True,
Expand All @@ -109,6 +116,8 @@ def create_container(
memswap_limit=0,
restart_policy={"name": "always"},
cpu_quota=500000,
volumes=volumes,
command="sh -c 'service rsyslog restart'",
)
return container
except APIError as e:
Expand Down