Skip to content

Comments

CAMEL-18679: camel-docker - Bind mount support#8697

Merged
essobedo merged 1 commit intomainfrom
CAMEL-18679/bind-mount-support
Nov 9, 2022
Merged

CAMEL-18679: camel-docker - Bind mount support#8697
essobedo merged 1 commit intomainfrom
CAMEL-18679/bind-mount-support

Conversation

@essobedo
Copy link
Contributor

@essobedo essobedo commented Nov 9, 2022

Fix for https://issues.apache.org/jira/browse/CAMEL-18679

Motivation

Up to now, there is no way to bind mount a volume.

Modifications

  • Use the DOCKER_BINDS constant for the operation containercreate to specify the binds to apply
  • Update the unit test for the operation containercreate to ensure that the changes are properly applied
  • Fix violations in CreateContainerCmdHeaderTest

Result

It is now possible to bind mount a volume as follows:

.setHeader(DockerConstants.DOCKER_BINDS, constant(Bind.parse("/some/host/directory/:/some/guest/directory:ro")))
.to("docker:containercreate")

Note that an array of Bind can also be provided

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

🌟 Thank you for your contribution to the Apache Camel project! 🌟

⚠️ Please note that the changes on this PR may be tested automatically.

If necessary Apache Camel Committers may access logs and test results in the job summaries!

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

Components tested:

Total Tested Failed ❌ Passed ✅
1 1 0 1

@essobedo
Copy link
Contributor Author

essobedo commented Nov 9, 2022

The checkstyle issue is not related to these changes, the error is the following:

Could not find artifact org.apache.camel:camel-mail-microsoft-oauth:jar:3.20.0-SNAPSHOT

@essobedo essobedo merged commit 54abe30 into main Nov 9, 2022
@essobedo essobedo deleted the CAMEL-18679/bind-mount-support branch November 9, 2022 11:57
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.

3 participants