我确实意识到我已经为bash编写了代码。但是在这种情况下它使用/ bin / sh。我该如何重写呢。
此:
Step 8/17 : RUN if [ "$KEY" == "" ] ; then echo "SSH key is not set, aborting" ; exit 1 ; else echo "SSH key is set" ; fi
结果:
/bin/sh: 1: [: unexpected operator
而且:
Step 7/15 : RUN if test "$KEY" == "" ; then echo "SSH key is not set, aborting" ; exit 1 ; else echo "SSH key is set" ; fi
结果:
/bin/sh: 1: test: unexpected operator