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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for VolumeOptions.Subpath in docker_container.mounts.volume_options #612

Open
pauliuspetk opened this issue Apr 25, 2024 · 1 comment

Comments

@pauliuspetk
Copy link

pauliuspetk commented Apr 25, 2024

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Please add support for the new Subpath field in VolumeOptions added in Docker version 26.0.0.

It allows mounting a specific path within a volume to a target. Previously, it was only possible to mount the root of a volume to a target.

New or Affected Resource(s)

  • docker_container

Potential Terraform Configuration

resource "docker_container" "postgres" {
  image = "postgres:latest"
  name = "postgres"
  mounts {
    type = "volume"
    source = docker_volume.volume.name
    target = "/var/lib/postgresql/data"
    volume_options {
      subpath = "some/path/pg_data"
    }
  }
}

References

moby/moby#45687
moby/moby@bfb8104

@pauliuspetk pauliuspetk changed the title Support for VolumeOptions.Subpath Support for VolumeOptions.Subpath in docker_container.mounts.volume_options Apr 25, 2024
@andrewgosselin
Copy link

I believe this renovate PR needs fixed and merged before this can happen since the Subpath changes were introduced in v26.1.2.

From looking at the build errors in that pull request it looks like the subpath changes introduced within the update is what's causing it to fail the build acceptance tests.

I do have a pull request in the works to add support but it hinges on getting that docker cli up to date. I may look into creating one myself to update it but its like 6 major versions behind, not sure if I have time for that. 馃槩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants