Skip to content
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

Unable to map files into Windows container #11

Open
lbotinelly opened this issue Sep 23, 2020 · 2 comments
Open

Unable to map files into Windows container #11

lbotinelly opened this issue Sep 23, 2020 · 2 comments
Assignees

Comments

@lbotinelly
Copy link

lbotinelly commented Sep 23, 2020

Summary
Not able to start the docker-compose stack in Windows Server.

Description
When starting the stack on a Windows Server with docker-compose up -d, the following log is presented:

ERROR: for gitwriter  Cannot create container for service gitwriter: invalid volume specification: 'C:\repo\CWRC-GitWriter-Docker\container_volumes\cwrc-gitwriter\config.json:/apps/CWRC-GitWriter/build/config/config.json:rw': invalid mount config for type "bind": source path must be a directory
ERROR: for gitserver  Cannot create container for service gitserver: invalid volume specification: 'C:\repo\CWRC-GitWriter-Docker\container_volumes\cwrc-gitserver\config.json:/apps/CWRC-GitServer/config.json:rw': invalid mount config for type "bind": source path must be a directory
ERROR: for gitwriter  Cannot create container for service gitwriter: invalid volume specification: 'C:\repo\CWRC-GitWriter-Docker\container_volumes\cwrc-gitwriter\config.json:/apps/CWRC-GitWriter/build/config/config.json:rw': invalid mount config for type "bind": source path must be a directory
ERROR: Encountered errors while bringing up the project.

This seems to be related to reported issues across other stacks:

docker/for-win#376
moby/moby#30555

According to this comment, "Bind mounting files is a Linux specific quirk, no other Unix or non Unix OS I know of supports it[...]"

A possible solution replicating suggestions from similar threads would involve mapping the directories and then read the individual JSON configuration files as necessary.

Docker for Windows do not support file binding.

@lucaju
Copy link
Contributor

lucaju commented Sep 25, 2020

Hi @lbotinelly . Thanks for point this out.
I made the changes and push to the dev branch. b50080b
I will test it on our dev server tomorrow before pushing it to production.

@lucaju
Copy link
Contributor

lucaju commented Sep 26, 2020

Hi @lbotinelly . It seems your proposed solution worked well on Linux.
But beyond the modification on this repo b50080b I had to relocate the config file on GitServer repo as well cwrc/CWRC-GitServer@3d7e729

Unfortunately, I can't move the code to production to the master branch just yet. @ilovan is testing the latest change we recently made on the code and will be away next week. I hope to be able to merge code when I come back on the week after. I'll keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants