php-ddd-example
php-ddd-example copied to clipboard
Error building backoffice_backend_php
During the execution of make build
the following error appears.
Building backoffice_backend_php
[+] Building 15.3s (13/17)
=> [internal] load build definition from Dockerfile 0.4s
=> => transferring dockerfile: 1.04kB 0.1s
=> [internal] load .dockerignore 0.2s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/php:8-fpm-alpine 11.5s
=> [ 1/13] FROM docker.io/library/php:8-fpm-alpine@sha256:2978e086fddae9a74570f18a9034adf20120ed96dfae6347b82f3b5164f1face 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 1.73kB 0.0s
=> CACHED [ 2/13] WORKDIR /app 0.0s
=> CACHED [ 3/13] RUN wget https://github.com/FriendsOfPHP/pickle/releases/latest/download/pickle.phar && mv pickle.phar /usr/local/bin/ 0.0s
=> CACHED [ 4/13] RUN apk --update upgrade && apk add --no-cache autoconf automake make gcc g++ bash icu-dev libzip-dev rabbitmq-c rabbi 0.0s
=> CACHED [ 5/13] RUN pickle install [email protected] 0.0s
=> CACHED [ 6/13] ADD etc/infrastructure/php/extensions/rabbitmq.sh /root/install-rabbitmq.sh 0.0s
=> CACHED [ 7/13] ADD etc/infrastructure/php/extensions/xdebug.sh /root/install-xdebug.sh 0.0s
=> CACHED [ 8/13] RUN apk add git 0.0s
=> ERROR [ 9/13] RUN sh /root/install-rabbitmq.sh 3.0s
------
> [ 9/13] RUN sh /root/install-rabbitmq.sh:
#11 1.007 Cloning into 'php-amqp'...
#11 2.330 Note: switching to '87d2ca94a3536b7618aa1c865d56278b17d127f9'.
#11 2.330
#11 2.330 You are in 'detached HEAD' state. You can look around, make experimental
#11 2.330 changes and commit them, and you can discard any commits you make in this
#11 2.330 state without impacting any branches by switching back to a branch.
#11 2.330
#11 2.330 If you want to create a new branch to retain commits you create, you may
#11 2.330 do so (now or later) by using -c with the switch command. Example:
#11 2.330
#11 2.330 git switch -c <new-branch-name>
#11 2.330
#11 2.330 Or undo this operation with:
#11 2.330
#11 2.330 git switch -
#11 2.330
#11 2.330 Turn off this advice by setting config variable advice.detachedHead to false
#11 2.330
: No such file or directorybitmq.sh: cd: line 2: can't cd to php-amqp
: not foundroot/install-rabbitmq.sh: line 3: phpize
: not foundroot/install-rabbitmq.sh: line 4: ./configure
: not foundroot/install-rabbitmq.sh: line 5: make
'. Stop. make: *** No rule to make target 'install
------
executor failed running [/bin/sh -c sh /root/install-rabbitmq.sh]: exit code: 2
ERROR: Service 'backoffice_backend_php' failed to build : Build failed
make: *** [Makefile:72: start] Error 1
Any clue how to solve it? I'm running it on Windows 10 and I'm getting the same issue/output.
Thx!
Solution here: https://github.com/CodelyTV/php-ddd-example/issues/214
Removing BOM and CRs:
sed -i '1s/^.*#//;s/\r$//' etc/infrastructure/php/extensions/rabbitmq.sh
sed -i '1s/^.*#//;s/\r$//' etc/infrastructure/php/extensions/xdebug.sh
Worked for me!
Thank you for help :)
In windows, open these files and use lf instead of crlf etc/infrastructure/php/extensions/rabbitmq.sh etc/infrastructure/php/extensions/xdebug.sh