The deal for the 33-year old is worth $7.5 million with $4 million in the first year and $2 million in guaranteed money.
Dockett has amassed 459 tackles, 40.5 sacks, four interceptions and seven forced fumbles during his career.
Docket was entering the final year of his contract with the Cardinals and was due to make $6.55 million. The Cardinals were trying to bring him back at a lower cost and even offered him a one-year $2.5 million deal with a chance to earn up to $4 million, but he chose the NFC West rival 49ers instead.