Is there a way to do port-forwarding in lxd-containers like docker does?
I heard some rumours that there is no easy way.
According to the homepage of lxd this is their goal:
Intuitive (simple, clear API and crisp command line experience)
For me port forwarding is an important part.
I am not in a hurry. If it is planed for a future release, this would be a valid answer.
Four years later, the prediction given in this answer was fortunately too pesimisitc. Port forwarding has been implementented in LXD in the meantime as is documented here.
To forward port 80 on the host to 8080 in the container, simply do
One of the developers wrote in this issue about the topic:
So, I'm afraid, as things stand currently, there is no port forwarding, neither now nor in the future.(This prediction turned out to be not true)