ERROR 2006 (HY000): MySQL server has gone away | Docker

When im trying to restore a 3.8GB of my_database.sql file I’m getting this error

MySQL root password: 
ERROR 2006 (HY000) at line 10236: MySQL server has gone away
Table 'tabDefaultValue' missing in the restored site. Database not installed correctly, this can due to 
lack of permission, or that the database name exists. Check your mysql root password, validity of the backup file or use --force to reinstall

this is my my.cnf configuration

# Port or socket location where to connect
# port = 3306
socket = /run/mysqld/mysqld.sock

# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/

character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
innodb_read_only_compressed = FALSE
#wait_timeout = 28800
#max_allowed_packet = 128M

default-character-set = utf8mb4
connect_timeout = 43200
max_allowed_packet = 2048M
net_buffer_length = 512M
debug-info = TRUE

I tried so many solutions from this link ERROR 2006 (HY000): MySQL server has gone away

Please help me resolve the issue