Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: api for mounts and volumes #596

Merged
merged 1 commit into from
Apr 27, 2024
Merged

refactor!: api for mounts and volumes #596

merged 1 commit into from
Apr 27, 2024

Commits on Apr 27, 2024

  1. refactor!: api for mounts and volumes

    Closes #582
    
    This is breaking change.
    
    The API was unclear, because `volumes` used to mean `bind-mounts`, which is wrong.
    
    Introduce `Mount` structure with the following mount types:
    - bind
    - volume
    - tmpfs
    
    Also exposes access-mode configuration for mounts: `rw` (read-write) and `ro` (read-only)
    
    *Note*: named volumes not getting removed once container is removed, it's intentional for now. Because named volumes can be used to persist a state. We can review this point later.
    
    ## Migration guide
    
    - If your `Image` implements `volumes` method:
      - rename method to `mounts`
      - wrap all existed "volumes" into `Mount::bind_mount(host_path, container_path)`
    - If your code uses `RunnableImage::with_volume`
      - replace the call with `RunnableImage::with_mount`
    - If your code uses `GenericImage::with_volume`
      - replace the call with `GenericImage::with_mount`
    DDtKey committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    dc512de View commit details
    Browse the repository at this point in the history