To recreate, copy the two other files in this gist to a directory, and run:
docker build .
You'll see something like this:
Sending build context to Docker daemon 3.072kB
Step 1/5 : FROM rakudo-star:2020.10
---> 0ea0359d0e76
Step 2/5 : WORKDIR /app
---> Using cache
---> 7c5f59e66f97
Step 3/5 : COPY . .
---> 81c3b37237b4
Step 4/5 : USER raku
---> Running in 55e9af16002a
Removing intermediate container 55e9af16002a
---> 2d75a4939c57
Step 5/5 : RUN raku -c -I. -MDockertest -e ''
---> Running in 4cb736de718b
BUG!
Syntax OK
Removing intermediate container 4cb736de718b
---> c13a18df9a9b
Successfully built c13a18df9a9b
Note the BUG!
line, which indicates MAIN was run despite using raku -c
to do syntax-check-only mode.
Now if you comment out this line in the Dockerfile:
USER raku
Rerun the build, and no BUG!
line.
Yep, phasers are run... I don't think MAIN should, that's kind of weird.