I know questions with such an error have already been asked several times, however I couldn't find a solution so I'm assuming that my case is different.
I have a Dockerfile like this:
FROM alpine:latest as builder
RUN apk add --no-cache bash
COPY bin /main/bin
COPY conf /main/conf
RUN ./main/bin/my-script 1
FROM mysql:5.7
COPY --from=builder /main/dist/sql /sql
ADD generate-databases.sh /docker-entrypoint-initdb.d
and this is working absolutely fine both on Linux, and on macOS(using Docker Desktop).
The problem is that on Windows using Docker Desktop I get the following error:
Service 'db' failed to build: The command '/bin/sh -c ./main/bin/my-script 1' returned a non-zero code: 127
why does this happen only on Windows, while working fine in other platforms?