Makefile 914 B

12345678910111213141516171819202122232425
  1. .PHONY: default build build-nginx run live
  2. default: build build-nginx run
  3. # this target sets up Jekyll, and uses it to build html
  4. build:
  5. docker build -t rancher/rancher.github.io:build -f Dockerfile.build .
  6. # this target uses the Jekyll html image in a multistage Dockerfile to build a small nginx image
  7. build-nginx:
  8. docker build -t rancher/rancher.github.io .
  9. run: build-nginx
  10. docker run --rm -p 80:80 rancher/rancher.github.io
  11. # this target will use the jekyll image and bind mount your local repo, when you modify a file, the html will be automatically rebuilt. (the redirects from latest won't work)
  12. # You can also examine the output html in the _sites dir.
  13. live:
  14. docker run --rm -it -p 80:4000 -v $(PWD)/os:/build/os/v1.0/en rancher/rancher.github.io:build jekyll serve -w -P 4000 --incremental
  15. clean:
  16. rm -rf _sites
  17. docker rmi rancher/rancher.github.io
  18. docker rmi rancher/rancher.github.io:build