···2121FROM scratch
22222323# Import the SSL certificates from the first stage.
2424-COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
2424+COPY --from=build-env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
25252626# Copy the binary from the first stage.
2727-COPY --from=builder /sonar /sonar
2727+COPY --from=build-env /sonar /sonar
28282929# Set the startup command to run the binary
3030CMD ["/sonar"]