Closed gadelkareem closed 7 years ago
I'm seeing the same issue when I'm trying to create a new image based off of the phpunit/phpunit
docker image.
I can see the ENV PEAR_PACKAGES foo
and ONBUILD RUN pear install $PEAR_PACKAGES
lines were added when the 5.7.0 tags where merged and doesn't exist on the earlier tags 5.5.0 and below
@JulienBreux Any ideas?
Okey guys, I fix that ASAP with a if.
ONBUILD RUN [ $PEAR_PACKAGES != "foo" ] && pear install $PEAR_PACKAGES
It's done :)
This is not yet fixed.
# Executing 1 build trigger...
Step 1/1 : RUN [ $PEAR_PACKAGES != "foo" ] && pear install $PEAR_PACKAGES
---> Running in 9451059aae7e
The command '/bin/sh -c [ $PEAR_PACKAGES != "foo" ] && pear install $PEAR_PACKAGES' returned a non-zero code: 1
If PEAR_PACKAGES equals "foo" expression [ $PEAR_PACKAGES != "foo" ] returns 1.
Correct fix would be:
RUN [ $PEAR_PACKAGES != "foo" ] || exit 0 && pear install $PEAR_PACKAGES
Excacly, @rousku a ... PR ? << :D
I got this error too, using the following Dockerfile:
FROM phpunit/phpunit
RUN echo "hello world"
The error is
Building phpunit
Step 1/2 : FROM phpunit/phpunit
# Executing 1 build trigger
---> Running in 68128fd92689
/bin/sh: syntax error: unexpected end of file (expecting "}")
ERROR: Service 'phpunit' failed to build: The command '/bin/sh -c { [ "${PEAR_PACKAGES}" != "foo" ] } || exit 0 && pear install ${PEAR_PACKAGES}' returned a non-zero code: 2
if i put the line in a separate file just for testing like 'test.sh':
#!/bin/bash
/bin/sh -c '{ [ "${PEAR_PACKAGES}" != "foo" ] } || exit 0 && pear install ${PEAR_PACKAGES}'
i get the same error message as noted above. To be honest, i dont see the problem here, and if i copy the original phpunit dockerfile and build it, it works.
@JulienBreux Would you be so kind to check if you can reproduce the problem with the Dockerfile given above?
I got exactly the same problem as you @VRciF ...
Step 1/2 : FROM phpunit/phpunit:latest
# Executing 1 build trigger
---> Running in 0256df07ae1f
/bin/sh: syntax error: unexpected end of file (expecting "}")
ERROR: Service 'vma-phpunit-debug' failed to build: The command '/bin/sh -c { [ "${PEAR_PACKAGES}" != "foo" ] } || exit 0 && pear install ${PEAR_PACKAGES}' returned a non-zero code: 2
This issue has been addressed in #77. Pull request #83 fixes the issue.
I am getting this error