# Upgrade from 10.7.0-community to version 25.3.0.104237-community (Docker)

**URL:** <https://community.sonarsource.com/t/upgrade-from-10-7-0-community-to-version-25-3-0-104237-community-docker/136927>\
**Category:** SonarQube Server / Community Build\
**Tags:** docker\
**Created:** [March 17, 2025, 1:24pm UTC](https://community.sonarsource.com/t/upgrade-from-10-7-0-community-to-version-25-3-0-104237-community-docker/136927 "2025-03-17T13:24:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rodrigo\_Pinheiro\_dos](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rodrigo_pinheiro_dos/32/67802_2.png) [@Rodrigo\_Pinheiro\_dos](https://community.sonarsource.com/u/Rodrigo_Pinheiro_dos)\
**Post date:** [March 17, 2025, 1:24pm UTC](https://community.sonarsource.com/t/upgrade-from-10-7-0-community-to-version-25-3-0-104237-community-docker/136927/1 "2025-03-17T13:24:52Z")

</div>

Hello colleagues,

We have a project here that implements Sonarqube Community and was deployed using docker/docker compose solution, as detailed in the code below.

```yaml
services:
  sonarqube:
    image: sonarqube:sonarqube:10.7.0-community
    hostname: sonarqube
    container_name: sonarqube-embrapadevops
    restart: unless-stopped
    depends_on:
      - postdb
    environment:
      SONAR_JDBC_URL: jdbc:postgresql://postdb:5432/sonar
      SONAR_JDBC_USERNAME: sonar_acesso_d
      SONAR_JDBC_PASSWORD: ${SONAR_DB_PASSWORD}
    volumes:
      - sonardata:/opt/sonarqube
    ports:
      - "9451:9000"
    networks:
      - devopsnet
  postdb:
    image: postgres:latest
    hostname: postgresql
    container_name: postgresql-embrapadevops
    restart: unless-stopped
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD_FILE: /run/secrets/postgres_root_pass
    secrets:
      - postgres_root_pass
    volumes:
      - ${POSTGRESQL_CREATE_DATABASE}:/docker-entrypoint-initdb.d/create-databases.sh
      - postgresdata:/var/lib/postgresql/data
    ports:
      - "5432:5432"
    networks:
      - devopsnet
networks:
  devopsnet:
    name: devopsnet
    external: true
secrets:
  postgres_root_pass:
    file: postgres_root_pass.txt
volumes:
  postgresdata:
    driver: local
    name: "embrapadevops_postgresdata"
    driver_opts:
      type: none
      o: bind
      device: ${POSTGRESQL}
  sonardata:
    driver: local
    name: "embrapadevops_sonardata"
    driver_opts:
      type: none
      o: bind
      device: ${SONARQUBE_DATA}

```

We recently tried to upgrade from version **10.7.0-community** to version **25.3.0.104237-community** , following the instructions available [here](https://docs.sonarsource.com/sonarqube-community-build/server-upgrade-and-maintenance/upgrade/upgrade-the-server/roadmap/).

However, even after removing and replacing the docker container version and accessing the setup page, no update was made and the system continues to display version 10.7.0 in the page footer. The setup page, when accessed, indicates that everything is up to date and that no changes are necessary. We did not identify any error messages in the console.

Could there be any step that we might have missed?

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [March 18, 2025, 9:55am UTC](https://community.sonarsource.com/t/upgrade-from-10-7-0-community-to-version-25-3-0-104237-community-docker/136927/2 "2025-03-18T09:55:02Z")

</div>

Hey there.

Just to be super clear – you’ve run `docker compose down` `docker compose up`?

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Pinheiro\_dos](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rodrigo_pinheiro_dos/32/67802_2.png) [@Rodrigo\_Pinheiro\_dos](https://community.sonarsource.com/u/Rodrigo_Pinheiro_dos)\
**Post date:** [March 18, 2025, 11:32am UTC](https://community.sonarsource.com/t/upgrade-from-10-7-0-community-to-version-25-3-0-104237-community-docker/136927/3 "2025-03-18T11:32:58Z")

</div>

Hi Colin,

Yes, I did. Before running compose up, I even removed the image from the previous container.

Thank you for your attention.

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [March 19, 2025, 3:47pm UTC](https://community.sonarsource.com/t/upgrade-from-10-7-0-community-to-version-25-3-0-104237-community-docker/136927/4 "2025-03-19T15:47:20Z")

</div>

I’m not quite sure what to tell you! It seems like somehow you’re not actually pulling the latest docker image. In the state that you shared, it doesn’t seem you have a valid Docker Compose file.

> [@Rodrigo\_Pinheiro\_dos](#):
>
> ```auto
> image: sonarqube:sonarqube:10.7.0-community
> 
> ```

There’s an extra `sonarqube:` here – it should just be `sonarqube:10.7.0-community`.

Putting that aside – I just tried it out myself and a simple `docker-compose down`, switching the image, `docker-compose up` worked as expected.

Are you **absolutely sure** that your SonarQube instance is being deployed by docker compose, and specifically this docker compose file? If you run `docker-compose down`, can you still access your SonarQube instance?

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Pinheiro\_dos](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rodrigo_pinheiro_dos/32/67802_2.png) [@Rodrigo\_Pinheiro\_dos](https://community.sonarsource.com/u/Rodrigo_Pinheiro_dos)\
**Post date:** [March 19, 2025, 5:42pm UTC](https://community.sonarsource.com/t/upgrade-from-10-7-0-community-to-version-25-3-0-104237-community-docker/136927/5 "2025-03-19T17:42:54Z")

</div>

Hi Colin,

Thank you very much for your support. I went through the process step by step and I think I identified the problem, or at least something that isn’t right in our configuration. I identified that the mapping for the volume “/opt/sonarqube/data” is not mapped to the correct external volume. I will adjust these settings and try the upgrade again.

| Host/volume | Path in container |
| --- | --- |
| 2873d508442ab7a8cd05a55e4d432b0fdb318e2b98c676afb7d2ca6dfdb25c68 | /opt/sonarqube/extensions |
| 10c99801b9d582f85717868daca365ba590776c45f01c57f0c24e1c8a4117177 | /opt/sonarqube/logs |
| fdeb9d2212c38c4156a791cad4a7a657a299d66fcc98c46549c67fa4c78f0d9e | /opt/sonarqube/temp |
| embrapadevops\_sonardata | /opt/sonarqube |
| f29b2487850b33c3b65990f8d63851b3f6d9760619a3e7a8c2fbb6531a131f3d | /opt/sonarqube/data |

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Pinheiro\_dos](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rodrigo_pinheiro_dos/32/67802_2.png) [@Rodrigo\_Pinheiro\_dos](https://community.sonarsource.com/u/Rodrigo_Pinheiro_dos)\
**Post date:** [March 19, 2025, 7:21pm UTC](https://community.sonarsource.com/t/upgrade-from-10-7-0-community-to-version-25-3-0-104237-community-docker/136927/6 "2025-03-19T19:21:24Z")

</div>

Hello Colin,

Following up after fixing the volumes, unfortunately the problem persists. Even after updating the container version and accessing the setup screen, it still shows as version 10.7.0.

Volumes:

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/9/2/92dae9e37da510089b5df11e300780aeaa8c2907.png)

Container details:

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/8/1/81e5c94a8fffea3e4ec8292aae4bed74e73c8bd7.png)

Sonar app not upgraded:

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/4/d/4d6259e94e14adb3786ac61e0d3e0cb39ea96943.png)

```yaml
sudo docker ps -f name=sonar
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
67489cc9bc9f sonarqube:25.3.0.104237-community "/opt/sonarqube/dock…" 15 minutes ago Up 15 minutes 0.0.0.0:9451->9000/tcp, [::]:9451->9000/tcp sonarqube-embrapadevops

```

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [March 20, 2025, 9:13am UTC](https://community.sonarsource.com/t/upgrade-from-10-7-0-community-to-version-25-3-0-104237-community-docker/136927/7 "2025-03-20T09:13:16Z")

</div>

Thanks for the update.

Re-reviewing your compose file, I’m somewhat suspicious of this.

> [@Rodrigo\_Pinheiro\_dos](#):
>
> ```auto
> volumes:
> - sonardata:/opt/sonarqube
> 
> ```

If you persist the _entire_ installation directory between container restarts, then… nothing will get installed.

You’ll see in our [example](https://github.com/SonarSource/docker-sonarqube/blob/master/example-compose-files/sq-with-postgres/docker-compose.yml) that only 4 directories are persisted.

```auto
    volumes:
      - sonarqube_data:/opt/sonarqube/data
      - sonarqube_extensions:/opt/sonarqube/extensions
      - sonarqube_logs:/opt/sonarqube/logs
      - sonarqube_temp:/opt/sonarqube/temp

```

Can I suggest you revisit your compose file and stop persisting the _entire_ install directory?

In any case, all SonarQube data is stored in the database. You do not risk losing any data.

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Pinheiro\_dos](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rodrigo_pinheiro_dos/32/67802_2.png) [@Rodrigo\_Pinheiro\_dos](https://community.sonarsource.com/u/Rodrigo_Pinheiro_dos)\
**Post date:** [March 20, 2025, 12:13pm UTC](https://community.sonarsource.com/t/upgrade-from-10-7-0-community-to-version-25-3-0-104237-community-docker/136927/8 "2025-03-20T12:13:01Z")

</div>

Hi Colin,

Thank you very much for your help. You nailed the problem. After removing the wrong volume mapping the update went smoothly.

My best regards

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [March 20, 2025, 12:23pm UTC](https://community.sonarsource.com/t/upgrade-from-10-7-0-community-to-version-25-3-0-104237-community-docker/136927/9 "2025-03-20T12:23:03Z")

</div>

Sorry I didn’t notice it sooner! Glad you were able to upgrade. :sonar:

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [March 27, 2025, 12:23pm UTC](https://community.sonarsource.com/t/upgrade-from-10-7-0-community-to-version-25-3-0-104237-community-docker/136927/10 "2025-03-27T12:23:42Z")

</div>

Closed on March 27, 2025, 12:23pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
