Can't connect to Oracle 12c from host machine

Hello everybody, I had installed docker Oracle 12c:
docker run -d -it --name OracleDB -P store/oracle/database-enterprise:12.2.0.1
then I logged into the container’s inner sqlplus to create a new user “MYUSER” for the default PDB: ORCLPDB1
docker exec -it OracleDB bash -c "source /home/oracle/.bashrc; sqlplus /nolog"
SQL>connect sys/Oradoc_db1@ORCLCDB as sysdba
BUT I can only log into Oracle’s ORCLCDB from host using mapped port, and can’t login ORCLPDB1 using user “MYUSER”, I use DBeaver. I noticed there have no “tnsnames.ora” under ‘/u01/app/oracle/product/12.2.0/dbhome_1/network/admin/’ in container’s environment and add the file by using:
docker exec -it OracleDB bash -c "vi /u01/app/oracle/product/12.2.0/dbhome_1/network/admin/tnsnames.ora"
But it doesn’t work at all.in addition , I can’t log into Oracle’s ORCLCDB from the host using sys. It says:
Connection refused, socket connect lapse 1 ms. /172.17.0.1 32769 0 1 true

How can I log from outside the container using my created user?
One more word: I can log into the inner container’s sqlplus using “MYUSER/pswd@ORCLPDB1”

The problem was finally solved.
First, the tnsnames.ora should be Oracle Client’s config file, should not appear at Server-side(inside docker Oracle), and also not for DBeaver
Second, the key point connecting to PDB is to check it’s the service name inside docker SQLPLUS:
select con_id, name from v$services; the service name of PDB should be fully written into any connection string.
`