There is a lot involved in this. Like someone else said there's a difference between adoption and temporary custody. Also in most places, child services looks to family first to place a child. If family is unavailable, unwilling, or unsuitable, they tend to go to foster homes. If a friend were to offer to care for the child, that person usually has to go through the same procedures required to approve a home for fostering children. There are A LOT of legalities, it's not as simple as keeping a promise to a friend.
If I had a friend who was in this situation and they asked me to care for their child, I would first make sure that family wasn't an option. Especially with an 8 month old. A child that long would build a bond with whoever was caring for them, and would probably not even "know" their parent. In that case I think it would be much easier for everyone involved if the child stayed with family members.