- Set up a wildcard A record entry in your domain name's zone file.
docker run -d -e VIRTUALHOST=myapp.mydomain.com user/myapp
This assumes:
- Your app is listening on 80/tcp.
If this is not the case then pass in an extra environment variable -e PORT=8000 (for example).