GNOME uses the application launchers found in the ~/.local/share/applications
directory. If you move your application launcher there, it should change the icon in both the applications dashboard and the dock. Desktop launcher files placed here will override desktop launchers in /usr/share/applications
by the same file name for your user only.
As an example, I changed the icon for Google Chrome to the 2048 logo. It appears in both the application dashboard and dock:
-- 
Contents of ~/.local/share/applications/google-chrome.desktop
:
[Desktop Entry]
Version=1.0
Type=Application
Name=Google Chrome
Comment=Access the Internet
Icon=2048
Exec=/usr/bin/google-chrome-stable
Categories=Network;WebBrowser;
.desktop
file in your original question? If I can see how you're launching the script, it might help. – BenJetson Nov 02 '17 at 11:24