You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e292fdb
Browse filesBrowse the repository at this point in the historyBrowse files
feat(dev-container): map the paths of docker compose to the host
`docker compose` and `docker-compose` passed the compose file through
unchanged, so every bind mount in it named a path in the dev-container that
the daemon then looked up on the host. For up, create, run, watch and scale
the file is now rendered with `config --format json`, bind sources, secret
and config files and bind-driver volume devices are mapped with
cuos-host-path, and compose runs on the result. `docker-compose` hands over
to the docker wrapper.
Two defects in the same wrapper fixed on the way:
- A short option with an attached value was split letter by letter:
`-p8080:80` became `-p -8 -0 ...`, `-eFOO=bar` and `-w/srv` likewise,
and so did options of the command inside the container (`find -name`).
Only a cluster of boolean flags ending in -v is expanded now.
- cuos-host-path printed its usage text on stdout for a path that did not
exist yet, and the wrapper mounted that text as the source. It now
resolves with `realpath -m` and reports errors on stderr.
Verified with docker.test.sh (15 passed) and shellcheck, against mocks only:
not run against a real daemon or the compose version in the image.
Signed-off-by: Simon Walz <contact@simonwalz.de>
'compose -p p -f @{"name":"p","services":{"s":{"build":{"context":"/src"},"volumes":[{"type":"bind","source":"/HOST/data/x","target":"/x"},{"type":"volume","source":"v","target":"/v"}]}},"secrets":{"k":{"file":"/HOST/data/k"}},"volumes":{"v":{},"b":{"driver_opts":{"type":"none","o":"bind","device":"/HOST/data/b"}}}} up -d' \
170
+
compose -p p -f compose.yml up -d
171
+
172
+
# 13) compose: commands that create no container pass through
173
+
expect "compose ps passthrough" \
174
+
"compose -f compose.yml ps" \
175
+
compose -f compose.yml ps
176
+
177
+
# 14) compose: -v of `compose run` is mapped like docker's
0 commit comments