Skip to content

Commit a2b7316

Browse files
authored
Merge pull request #208 from willglynn/default_docker_command
Add default Docker command
2 parents bea2125 + 665412c commit a2b7316

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ RUN apt-get update \
66
ADD src /src/herbie
77
RUN raco pkg install --auto /src/herbie
88
ENTRYPOINT ["racket", "/src/herbie/herbie.rkt"]
9+
CMD ["web", "--port", "80", "--quiet", "--demo"]

www/doc/1.2/docker.html

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ <h2>Generating files and reports</h2>
6161
need to mount the input in the Docker container. Do that with:
6262
</p>
6363

64-
<pre><strong>$</strong> docker run -it \
64+
<pre><strong>$</strong> docker run -it --rm \
6565
-v <var>in-dir</var>:/in \
6666
-v <var>out-dir</var>:/out \
6767
-u $USER \
@@ -79,7 +79,7 @@ <h2>Generating files and reports</h2>
7979
To generate reports from Herbie, you can run:
8080
</p>
8181

82-
<pre><strong>$</strong> docker run -it \
82+
<pre><strong>$</strong> docker run -it --rm \
8383
-v <var>in-dir</var>:/in \
8484
-v <var>out-dir</var>:/out \
8585
-u $USER \
@@ -96,19 +96,12 @@ <h2>Running the web shell</h2>
9696

9797
<p>
9898
Running the web shell in Docker requires exposing the ports inside
99-
the container. Use the <code>-p</code> option to Docker to expose
100-
whatever ports Herbie chooses to use, and then use
101-
the <code>--port</code> option to Herbie to choose that port.
99+
the container. The Herbie Docker image binds to port 80 by default;
100+
use the <code>-p &lt;hostport&gt;:80</code> option to Docker to expose
101+
Herbie on whatever port you choose.
102102
</p>
103103

104-
<pre><strong>$</strong> docker run -itp \
105-
uwplse/herbie web --quiet</pre>
106-
107-
<p>
108-
Note that the <code>--quiet</code> flag is passed,
109-
to prevent Herbie from attempting to start a web server
110-
inside the Docker container.
111-
</p>
104+
<pre><strong>$</strong> docker run -it --rm -p 8000:80 uwplse/herbie</pre>
112105

113106
<p>
114107
If you are using the <code>--log</code>

0 commit comments

Comments
 (0)