Skip to content

fix: add --volume support to convertDockerRunToCompose#8923

Open
sudee404 wants to merge 1 commit intocoollabsio:nextfrom
sudee404:fix/volume-custom-docker-run-options
Open

fix: add --volume support to convertDockerRunToCompose#8923
sudee404 wants to merge 1 commit intocoollabsio:nextfrom
sudee404:fix/volume-custom-docker-run-options

Conversation

@sudee404
Copy link

Changes

--volume flags in Custom Docker Run Options are silently ignored because convertDockerRunToCompose() has no mapping for them. This adds --volume to $list_options, $mapping, and a handler block so that volume bind mounts specified via Custom Docker Run Options are correctly included in the generated docker-compose config.

Issues

  • Related to volume mounts not being applied when using Docker Image build pack with Custom Docker Run Options

Category

  • Bug fix
  • Improvement
  • New feature
  • Adding new one click service
  • Fixing or updating existing one click service

AI Assistance

  • AI was used (please describe below)

If AI was used:

  • Tools used: Claude
  • How extensively: Identified the missing mapping and wrote the 6-line fix

Testing

Tested on a live Coolify v4.0.0-beta.460 instance:

  1. Set Custom Docker Run Options to --volume /opt/data/logs:/app/logs --volume /opt/data/tracking:/app/tracking
  2. Before fix: docker inspect shows Mounts: []
  3. After fix: docker inspect shows both bind mounts applied
  4. Also verified convertDockerRunToCompose() directly returns ['volumes' => ['/opt/data/logs:/app/logs', '/opt/data/tracking:/app/tracking']]

Contributor Agreement

Important

  • I have read and understood the contributor guidelines. If I have failed to follow any guideline, I understand that this PR may be closed without review.
  • I have searched existing issues and pull requests (including closed ones) to ensure this isn't a duplicate.
  • I have tested all the changes thoroughly with a local development instance of Coolify and I am confident that they will work as expected when a maintainer tests them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant