Note: you can now configure this simply in iTerm2's application settings. Go to Preferences > Appearance > System and select "Exclude from Dock and ⌘-Tab Application Switcher".
On my dual-drive MacBook Pro I have remapped the eject key to F13 using Karabiner and NoEjectDelay. The eject key has been assigned as the hotkey for a guake-style visor terminal using iTerm2. Having its own hotkey precludes the need for an icon, so I prefer to hide the iTerm dock icon.
To hide the dock icon of iTerm2 on Mac OS X:
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist
/usr/libexec/PlistBuddy -c 'Delete :LSUIElement' /Applications/iTerm.app/Contents/Info.plist
defaults write com.googlecode.iterm2 HotkeyTermAnimationDuration -float 0.00001
tested with iTerm 2.0.0.20150412 on Apple MacBook Pro (Late 2011) running OS X 10.10.3
A note for future readers, this is actually supported natively in the app now: https://apple.stackexchange.com/questions/415556/how-to-hide-the-iterm-icon-from-status-menu