Here is my docker-compose.yml
version: '2'
services:
backend:
tty: true
build:
context: project/backend
environment:
- VIRTUAL_HOST=*/api/*,https://*/api/*
- VIRTUAL_HOST_WEIGHT=42
If I try to do
docker-compose up
on windows at somepoint I get:
[91m/bin/sh: 1: ./mvnw: Permission denied
[0m[31mERROR[0m: Service 'backend' failed to build: The command '/bin/sh -c ./mvnw package' returned a non-zero code: 126
I am using Windows 10 64 bit Professional Anybody has an idea on how to fix this?
Looks like this is a bug with docker-compose. When building on Windows, the regular docker build
command will set all files to -rwxr-xr-x
, but it looks like docker-compose is not doing this. It will be fixed in the next release of compose.
https://github.com/docker/compose/issues/3065#issuecomment-191489901
The workaround, as suggested by dnephin is to add RUN chmod +x your/files
to the end of your dockerfile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With