Change DNS server in Ubuntu 18.04

In Ubuntu desktop 18.04, it seems that in order to change the DNS server, you need to open Network Manager in the UI and set the DNS server IP Address.

However it doesn’t work until you restart or run sudo netplan apply.

If you use Ubuntu server, you need to modify a yaml file within yaml file, then run netplan apply.

Not sure why doing so in Ubuntu desktop doesn’t work, though.

Cannot restore database to SQL Server running in Docker container

I faced this issue, turned out when using docker cp to copy files to the container, the files were owned by root user and other users didn’t have read permission. This is because the files were copied from shared folder in Windows host to the linux VM.

Because only root can read, I couldn’t restore the DB using the copied file as the server cannot read the file.

Doing a chmod to add read permission before copying into the container solves the issue.