-
Notifications
You must be signed in to change notification settings - Fork 2k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running a container with a Samba volume specified by a hostname seems to have stop working. #4816
Comments
Starting from v25, Moby now performs the DNS resolution directly from the Looks like the cifs treats passing both a resolved IP as device and Try removing the
|
Thanks for your quick answer, I'll try this when my pipeline has finished ! |
I've tried your solution and I get an error but not the same. I've tested multiple combination and I think I've managed to gather enought information to complete my answer. To help you understand my exploration, here is some context:
EXPLORATION docker volume create \
--driver local \
--opt type=cifs \
--opt device="//< SERVER_HOSTNAME >/< DATA_DIR_PREFIX >< SPACE_CARACTER >< DATA_DIR_SUFFIX >" \
--opt o=username=< USERNAME >,password=< PASSWORD >,file_mode=0777,dir_mode=0777 \
--name cif_volume
docker run -d -v cif_volume:/data gitlab/gitlab-runner:latest --name test
docker volume create \
--driver local \
--opt type=cifs \
--opt device="//< SERVER_HOSTNAME >/< DATA_DIR_PREFIX >%20< DATA_DIR_SUFFIX >" \
--opt o=username=< USERNAME >,password=< PASSWORD >,file_mode=0777,dir_mode=0777 \
--name cif_volume
docker run -d -v cif_volume:/data gitlab/gitlab-runner:latest --name test
docker volume create \
--driver local \
--opt type=cifs \
--opt device="//< SERVER_ADDR >/< DATA_DIR_PREFIX >%20< DATA_DIR_SUFFIX >" \
--opt o=username=< USERNAME >,password=< PASSWORD >,file_mode=0777,dir_mode=0777 \
--name cif_volume
docker run -d -v cif_volume:/data gitlab/gitlab-runner:latest --name test
docker volume create \
--driver local \
--opt type=cifs \
--opt device="//< SERVER_ADDR >/< DATA_DIR_PREFIX >< SPACE_CARACTER >< DATA_DIR_SUFFIX >" \
--opt o=username=< USERNAME >,password=< PASSWORD >,file_mode=0777,dir_mode=0777 \
--name cif_volume
docker run -d -v cif_volume:/data gitlab/gitlab-runner:latest --name test
CONCLUSION It seems that when the DNS resolution is performed, it converts the subdirectory special caracter (here the In any case, thanks for the time you've already given to answer my issue. |
This should be fixed by moby/moby#47191, which will be in the v25.0.1 release. |
Thanks to all of the team for your reactivity ! Have a nice day ! |
Description
Hi,
First of all thanks to your all your team and the community for all the work done and brought to everyone.
I'm using Docker in Docker to run CI steps with Gitlab runner and while the connection to a samba volume was working previously, it seems that the specification of a Samba volume by a hostname as described in your documentation doesn't work anymore.
It used to work smoothly 3 months ago (I have discontinued the CI worflow for a long time) and I've changed the storage volume since, so I was thinking the following error was coming from my side:
However I've finally suceeded to connect my volume directly using the IP address when creating the docker volume so this issue seems to originate from the field
addr
since the < SERVER_HOSTNAME > < SERVER_ADDR > conversion is correct.That's why I was wondering if this behaviour was coming from a modification of docker or if I was missing something out.
Reproduce
ISSUE
--driver local
--opt type=cifs
--opt device="//< SERVER_HOSTNAME >/< DATA_DIR >"
--opt o="addr=< SERVER_HOSTNAME >,username=< USERNAME >,password=< PASSWORD >,file_mode=0777,dir_mode=0777"
--name cif_volume
WORK AROUND
--driver local
--opt type=cifs
--opt device="//< SERVER_ADDR >/< DATA_DIR >"
--opt o="username=< USERNAME >,password=< PASSWORD >,file_mode=0777,dir_mode=0777"
--name cif_volume
Expected behavior
docker run -d -v cif_volume:/data gitlab/gitlab-runner:latest --name test
should run without any error when following Docker documentation.docker version
docker info
Client: Docker Engine - Community Version: 25.0.0 Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.12.1 Path: /usr/libexec/docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.24.1 Path: /usr/libexec/docker/cli-plugins/docker-compose
Additional Info
No response
The text was updated successfully, but these errors were encountered: