Start app after install via docker desktop

Hi im totally new with docker, i read a little and see some videos.

I use Ubuntu 24.04, and docker desktops.

I can install Docker, and after start docker, i install 2 different containers but when i try to open firefox, and put localhost:8080 or Localhost:8050 always say unable to connect, what i missing???

Thanks

How are you running the containers? Without knowing their configuration we can’t know what’s going wrong

Which is not supported. Please, check the documentation for more details and workarounds

Although the fact you were able to start Docker Desktop could mean you already read it, but I agree with @deanayalon, without our crystal ball, we can’t say what’s wrong when we don’t know in what :slight_smile:

Sorry im new, i reinstall ubuntu now 22.04
Docker and Docker Desktop.
Now i only install and start Traccar Container
traccar works on port 8082, but if i open local host 8082 doesn’t work

I need to do something more??

It doesn’t look like Traccar’s port is mapped to the host

If you started it using a docker run command, add -p 8082:8082 before the image name

Thanks for the fast reply, i start via actions button

Also if i have a few containers installed, how indicate each port for each container???

Also when i install the container don’t give me the option to add port

Then it is not possible to map ports to this image using Docker Desktop - You’ll have to use the command line

Last question, for example if i like to install a wordpress site.
I only need to run the wordpress Docker, or also i need to install PHP,Mysql etc??? or when i install a docker like Wordpress how need PHP and Mysql, the main container (Wordpress) install all necessary others apps??

You should separate each service to its own container

Great, Let me see if I understand correctly.

I install the MYSQL Container and the PHP Container
Then the Wordpress Container
If tomorrow I want to install a new program, i install the container that also uses mysql, and config something in this container, I don’t need to install it again Mysql.

That is not a docker, but a container.

Yes and no
If the projects are unrelated, you should probably use different mysql containers to store the data

Say I had two unrelated softwares storing their data in the same database, migrating one to another computer will be a headache

The wordpress image will already contain the PHP interpreter. But you can find the example here:

https://hub.docker.com/_/wordpress

That was my first thought when I started working with containers, but unless it drastically changed during the past years, MySQL is not a light weight database to run it multiple times on the same machine. Each instance would require resources. I don’t think it is worth it to run a separate MySQL or other relational database for each project in general. There could be cases when it is required when the applications require very different database optimization. Otherwise there are ways to export and import the database to another machine without the whole server. But all depends on the applications.

1 Like

Men you are the best.
Last questions before still testing, i create a Traccar and mysqltraccar container
Are a way to put both container on the same group or something?? so i now all this containers are together

I try create a Volume, but i dont see the option to put all in same Volume or create a Container inside a Volume

If not use Mysql, which one you recommend to use??

Read about Docker Compose, it’d help sort them all out with the configuration you need

They didn’t necessaarily mean switch from mysql, they meant mysql is resource-heavy and you may not want to run two separate instances of it

1 Like

From what little I understand, docker desktop is not very useful, since to open ports it is by command line, to do several together it is with docker compose.

So I don’t really understand why docker desktop is used, only to view logs more easily and see the resources used.

What database you use depends on the needs of your application. I won’t tell you what to use, I just don’t recommend running separate databases for every application. Just imagine you want a production server when you are more experienced and you run the database in a high availability mode running multiple replicas synchronizing the data. It would be hard to run a database cluster for each application, but if you don’t have limitless resources and you don’t know how to optimize the database extremely well, you could have problems with the preformance even when running a single instance. Not just memory and cpu, but even the disk performance.