Documentation on mounting volumes
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 13d 8h
- Merged PRs (30d)
- 2
Description
Hi,
I'm looking for ways to mount a volume in a container and found this documentation page, however, it's from an old version.
I tried to find the same section on the current docs but the volumes page does not contain the code snippet:
container_id = c.create_container(
'busybox', 'ls', volumes=['/mnt/vol1', '/mnt/vol2'],
host_config=docker.utils.create_host_config(binds=[
'/home/user1/:/mnt/vol2',
'/var/www:/mnt/vol1:ro',
])
)
Two questions:
- Is there any section in the current documentation where I can find a similar example?
- Is the code snippet still valid? I tested it and works fine, but I'd like to know if there are any changes I should be aware of
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the linked old volumes page with the current volumes page, then verify the shown create_container and create_host_config example against the current docker-py API. Done means the current documentation points to an equivalent volume-mounting example and explains any version-related changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100