docker-sonarqube icon indicating copy to clipboard operation
docker-sonarqube copied to clipboard

CORS support

Open idreesVenD opened this issue 3 years ago • 1 comments
trafficstars

Is there a way to add CORS support in the docker image?

idreesVenD avatar Apr 01 '22 12:04 idreesVenD

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.

  1. Alpine 3.14.6 used by sonarqube9 already supports multiple platforms.
  2. 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 .
image image

@Godin Can the official support multiple platforms?

This way we don't need to build the docker image ourselves.

mritd avatar May 17 '22 15:05 mritd

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.

jCOTINEAU avatar Jan 04 '23 14:01 jCOTINEAU

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.

mritd avatar Jan 05 '23 03:01 mritd

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.

jCOTINEAU avatar Jan 05 '23 07:01 jCOTINEAU

Closing based on inactivity, feel free to reopen.

jCOTINEAU avatar Apr 11 '23 08:04 jCOTINEAU