Yes, as long as the container is large enough, has drainage, and uses well-draining soil! Cucumbers also do well in raised beds.