docker-sonarqube
docker-sonarqube copied to clipboard
CORS support
Is there a way to add CORS support in the docker image?
First of all , it's easy to support multiple platforms.
Docker image multi-platform support first depends on whether the base image supports it; then it depends on whether the application supports it.
- Alpine 3.14.6 used by sonarqube9 already supports multiple platforms.
- Sonarqube is written in java, and only depends on JVM at runtime.
So we can use docker's buildx plugin to build docker images with multi-platform support.
For how to use buildx, please refer to the official docker documentation
~/g/d/9/community ❯❯❯ docker buildx build --platform linux/amd64,linux/arm64 -o type=image,push=true -t mritd/sonarqube .
@Godin Can the official support multiple platforms?
This way we don't need to build the docker image ourselves.
hello @idreesVenD and @mritd, thanks a lot for taking the time to participate in the community.
Regarding multi-platform, it is an ongoing work as alpine and jvm does not work well together on arm64 ( multiple runtime issue due tu musl libc and glibc ). It should be released with the new upcoming LTS and SonarQube 9.9
For @idreesVenD question was it about CORS as cross origin resources ?
If yes there is a community post here explaning how to do so.
Please let me know if this answer the issue.
It may be a digression: Although using alpine for JVM applications can reduce the size of the docker image, it seems that the loss outweighs the gain due to muslc compatibility issues. Personally, I think the base image based on debian is better, such as eclipse-temurin.
We do agree mritd, we made a huge test/discovery phase to find the best image, and we also agreed on eclipse-temurin for various reason.
Regarding the size, the increase is not that huge, 344 => 399 seems to be reasonable for the gain.
Closing based on inactivity, feel free to reopen.