Advertisement
Guest User

nginx docker

a guest
Sep 26th, 2015
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. sites.conf
  2. ===========
  3. server {
  4. listen 80;
  5.  
  6. server_name foo.bar.com;
  7.  
  8. location / {
  9. proxy_pass http://w.x.y.z:8000;
  10. proxy_http_version 1.1;
  11. proxy_set_header Upgrade $http_upgrade;
  12. proxy_set_header Connection 'upgrade';
  13. proxy_set_header Host $host;
  14. proxy_cache_bypass $http_upgrade;
  15. }
  16. }
  17.  
  18. Dockerfile
  19. ===========
  20. FROM nginx
  21. ADD conf/sites.conf /etc/nginx/conf.d/sites.conf
  22.  
  23. docker commands
  24. ================
  25. docker build -t nginx .
  26. Successfully built 38c9976e598c
  27. docker run --name nginx -p 80:80 38c9976e598c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement