fix: support relative bind mounts from agent containers#233
Closed
alex289 wants to merge 1 commit into
Closed
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HOST_DEPLOYMENTS_DIRconfiguration for host-visible deployment pathsRoot cause
Compose resolves relative bind mount sources inside the OrcaCD agent container, for example to
/deployments/<app>/data. The Docker daemon runs on the host and interprets bind sources in the host filesystem, so that container-internal path is not valid there.Impact
Applications can use convenient relative mounts such as
./data:/app/datawhile their files remain directly accessible on the host below the configured deployment directory.Validation
go test -race ./internal/agent -count=1go test -race ./internal/agent/docker -run 'TranslateBindMountSources|Deploy_(TranslatesBindMountForAllowlistedApplication|RestrictMountsAllowsTranslatedDeploymentBind)|CheckAndPullImages_TranslatesBindMountBeforeUp' -count=1go test ./... -run '^$'git diff HEAD^ HEAD --checkThe full Docker-daemon-backed test suite was not rerun during publishing; the focused regression tests and repository-wide Go compilation pass.
Possibly fixes #231