You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.2 KiB

  1. <!doctype html>
  2. <title>CodeMirror: Dockerfile mode</title>
  3. <meta charset="utf-8"/>
  4. <link rel=stylesheet href="../../doc/docs.css">
  5. <link rel="stylesheet" href="../../lib/codemirror.css">
  6. <script src="../../lib/codemirror.js"></script>
  7. <script src="../../addon/mode/simple.js"></script>
  8. <script src="dockerfile.js"></script>
  9. <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
  10. <div id=nav>
  11. <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
  12. <ul>
  13. <li><a href="../../index.html">Home</a>
  14. <li><a href="../../doc/manual.html">Manual</a>
  15. <li><a href="https://github.com/codemirror/codemirror">Code</a>
  16. </ul>
  17. <ul>
  18. <li><a href="../index.html">Language modes</a>
  19. <li><a class=active href="#">Dockerfile</a>
  20. </ul>
  21. </div>
  22. <article>
  23. <h2>Dockerfile mode</h2>
  24. <form><textarea id="code" name="code"># Install Ghost blogging platform and run development environment
  25. #
  26. # VERSION 1.0.0
  27. FROM ubuntu:12.10
  28. MAINTAINER Amer Grgic "amer@livebyt.es"
  29. WORKDIR /data/ghost
  30. # Install dependencies for nginx installation
  31. RUN apt-get update
  32. RUN apt-get install -y python g++ make software-properties-common --force-yes
  33. RUN add-apt-repository ppa:chris-lea/node.js
  34. RUN apt-get update
  35. # Install unzip
  36. RUN apt-get install -y unzip
  37. # Install curl
  38. RUN apt-get install -y curl
  39. # Install nodejs & npm
  40. RUN apt-get install -y rlwrap
  41. RUN apt-get install -y nodejs
  42. # Download Ghost v0.4.1
  43. RUN curl -L https://ghost.org/zip/ghost-latest.zip -o /tmp/ghost.zip
  44. # Unzip Ghost zip to /data/ghost
  45. RUN unzip -uo /tmp/ghost.zip -d /data/ghost
  46. # Add custom config js to /data/ghost
  47. ADD ./config.example.js /data/ghost/config.js
  48. # Install Ghost with NPM
  49. RUN cd /data/ghost/ && npm install --production
  50. # Expose port 2368
  51. EXPOSE 2368
  52. # Run Ghost
  53. CMD ["npm","start"]
  54. </textarea></form>
  55. <script>
  56. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  57. lineNumbers: true,
  58. mode: "dockerfile"
  59. });
  60. </script>
  61. <p>Dockerfile syntax highlighting for CodeMirror. Depends on
  62. the <a href="../../demo/simplemode.html">simplemode</a> addon.</p>
  63. <p><strong>MIME types defined:</strong> <code>text/x-dockerfile</code></p>
  64. </article>