Docker question

with the docker how would i be able to get from the musicbrainz-docker file into a postgres format as I could not figure out a way to get past that or find any information on it in the readme files. Everything i tried I got errors and it got progressively more complicated do you know of any good resources to get past this point as I was getting similar postgres related errors and others which I dont recall. So if you have experience with docker how would I do this I just couldnt find anything that didnt get similar errors. Essentially I have the musicbrainz-docker file but I dont know where to go from there can you advise?

I am using the test setup and sample database and want to host the sample database from my linux mint vm to be able to connect to on my host windows machine for context

Hi,

Are you using VirtualBox as recommended, or another way to run Linux Mint? (WSL?)
Edit: Got my answer from your other topic: using VirtualBox.

Which errors do you have? For which steps/commands?

Currently I am getting an error saying download docker link does not have a release file. I am also not sure how to get from having the docker folder to a running postgres server off my vm as i am going to try and use it in java code through jdbc. Oh also the error also says updating from repository does not exist. I have followed all the steps for the test setup too and docker says its running when i check

1 Like

For which command? What is the exact error message? Copy/paste or screenshot would help here.

This is totally doable by following the section “Publish ports of all services” as follows, from the musicbrainz-docker folder in a VM shell:

admin/configure add publishing-all-ports
sudo docker-compose up -d

Since it is running from VirtualBox, you also have to set it up to forward the port 5432 for postgres at least from the Linux VM to your Windows host; See networking - How to access server running in VirtualBox from the host? - Super User.

Same as above: Without the full log, it’s difficult to answer.

You can check that the release sample has been loaded by running the following command from the musicbrainz-docker directory in a VM shell:

sudo docker-compose exec db psql -d musicbrainz_db -U musicbrainz -c 'SELECT COUNT(*) FROM release'
2 Likes


Here is the error I am getting as it says docker is installed but when i update it says that. Dont know if ive incorrectly installed docker or its to do with permissons?

also I dont fully understand what the command on the how to access server running in virtual box from host means would I do this on windows command line and is there any prerequisites as I have no experience with windows command line

Just now too got this error after running


admin/configure add publishing-all-ports
sudo docker-compose up -d

This error is from apt-get update, not from Docker itself. My guess is that you genuinely followed Install Docker Engine on Ubuntu | Docker Docs but didn’t notice that it applies to Ubuntu, not to Linux Mint (not as-is at least). As a result, the configuration of APT in your Linux Mint VM now has a broken reference to the repository for installing the latest version of Docker.

If I guessed it correctly, then here is how to fix that first error:

sudo sed -i '/docker/s/vera/jammy/' /etc/apt/sources.list.d/docker.list
sudo apt-get update

I have no experience with Windows command line either, so always assume that this is from the Linux Mint shell under the musicbrainz-docker directory.

The sudo sed… command worked thanks

The sudo docker-compose up -d command still says encountered errors while bringing up the project however

Might it be you have another PostgreSQL server running on your host machine?
If so, you should configure VirtualBox to redirect the port 5432 to a free port instead.

Still getting the same error unfortunately :confused: sorry about this

Ok. Here are two commands to get more information about running containers and about potential listeners to port 5432:

sudo docker ps
sudo netstat -lntu

If you updated Docker in the meantime, it might be safer to stop the current project and start it again:

sudo docker-compose stop
sudo docker-compose up -d

It shows that something is listening to the port 5432 already, but it isn’t clear what.

Please check that your VirtualBox settings do not redirect to 5432. The Port Forwarding Rule should look like (for example if 54321 is a free port on your Windows host):

postgres | TCP | 127.0.0.1 | 54321 | (Guest IP) | 5432

Changing network settings require to restart the VM, if not VirtualBox.

I just moved the port to 54321 and its still doing it ive shut down virtualbox and the machine and its still doing it

But do you know what is listening to the port 5432 at the moment?
Is it a Postgres server running on your host server?
Or another Postgres server running in a VM maybe?

netstat -lnpt

I mean I tried the other method when I couldnt get the docker to work with these errors a few days back on a different virtual machine so it could be that since i got to the point of creating the database


doesnt seem like anything else is listening