Open
Description
I'm attempting to create a container with volume in some host path /home/ubuntu/data
bound to a container path /mnt/data
, but the volume is instead created and bound to var/lib/docker/vfs/<some-hash>/home/ubuntu/data
. Is there something I might be missing here? Here is the related code-snippet
_ = docker.containers.run(
image=image.id,
command=f"{args}",
name=c.DOCKER_IMAGE_NAME,
restart_policy={"Name": "always"},
volumes={f"{c.DATADIR_PATH.as_posix()}": {"bind": "/mnt/data", "mode": "rw"}},
ports={"5432": ("0.0.0.0", 5432), "5433": ("0.0.0.0", 5433)},
detach=True,
)
DATADIR_PATH=/home/ubuntu/data
. One thing to note is DATADIR_PATH
of of type Path
from pathlib
module
Metadata
Metadata
Assignees
Labels
No labels