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