More generally, if A and X0 are any finite CW complexes, and f : A → X0 is any map, let Y be the mapping cone of f, and let X be Y with the cone point removed; then Y is the one-point compactification of X, and the inclusion X0 → X is a homotopy equivalence. (David's example is the case A = X0 = S1, f = id.) So any map X → Y which is the mapping cone of something is homotopy equivalent to a one-point compactification.
I don't think you can realize any map of groups as the induced map on π1 of a mapping cone (0 → Z/2Z?) but you can realize (G → 0, 0 → a free group, ...)