What can I do if a security alert prevents my installation on macOS?

After moving OneDock to the Applications directory (Click here how to find out how to install OneDock) a security alert may appear. To proceed with the installation, click “Okay” on the warning. Now open the macOS settings app and go to “Security”. Make sure you are on the General Tab in the Security screen inside the Settings App. Click “Open anyway” and accept the warning about this being an internet download if it comes up.