I used a PVC elbow to attach to the long pipe, a smaller section of pipe on the other end of the elbow, used a hole drill bit to cut the opening in the side of the bucket near the bottom, and siliconed the "outlet" short piece of pipe into the hole. I did NOT need to glue or seal any part of the PVC except where it fit into the bucket; the elbow and end cap fit tightly enough without sealant. (This makes it easier to break down, should I need to work on it or move it to another coop or something.) I just wired the PVC pipe to hang from the floor of the coop/ceiling of the run/pen area.
I keep the bucket lid ON the bucket, but with a few holes punched into it so the gravity feed allows the water to keep the pipe with the "chicken nipples" full. That way the water stays clean.
And since the white bucket is just translucent enough to see the water level in it, I only have to remove the lid when the bucket needs filling.