A DIY bear canister out of pvc pipe will only work if a bear never tests it out. In other words, the moment a bear lays paws on it, but especially jaws on it, it will fail. Not fail just a little, but completely. If you have the wherewithal to make a steel bear canister at home, it would probably work, but it would be much heavier than the commercial canisters.

There is a good reason why the commercial canisters are expensive and DIY canisters are for all practical purposes non-existent. Bears are extremely strong, highly motivated and very smart. Commercial canisters are tested by filling them with tempting food and giving them to a grizzly to play with. It is a hard test to pass. grin