It’s possible to place OS X Dock in the left or right side corner of the screen with this hidden defaults write command. After applying the command you should restart the Dock. Use one of the following commands:
Adjust the Dock to the left side corner:
defaults write com.apple.dock pinning -string start
Adjust the Dock to the right side corner:
defaults write com.apple.dock pinning -string end
Restart the Dock to make the changes affect:
killall Dock
Screenshot:
Restore Dock to the default center position:
defaults delete com.apple.dock pinning