For check the files on my own container :
docker exec -it "name-container" /bin/sh
To view IP of container
docker inspect <container id> || grep "IPAddress"
To view files of container
docker exec -it <container ID or name container> /bin/bash
Copy files of docker to local
sudo docker cp <id container>:/<directory and filename> <destinate(directory and file)>
example:
sudo docker cp 135950565ad8:/geeksforgeeks.txt ~/Desktop/geeksforgeeks.txt
To enter mariadbContainer
docker exec -it my-mysql mysql -p -u root
To enter PostgresSql
psql -U 'user' -W -h localhost 'database'
Create table
create table carros (id SERIAL primary key not null, nombre varchar(20) not null, marca varchar(20) not null);
Insert data
insert into carros (nombre, marca) values ('Ferrario20', 'FERRARI');
Select from
select * from carros;