Skip to content

Commit a4635bc

Browse files
committed
add instructions for installing curl in the container
improving visibility of user inputs
1 parent 0da3527 commit a4635bc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

chapter_09_docker.asciidoc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ so that you can be sure of what's being run inside vs outside containers.
10191019
[subs="specialcharacters,macros"]
10201020
----
10211021
$ pass:quotes[*docker exec -it container-id-or-name bash*]
1022-
root@5ed84681fdf8:/src# pass:specialcharacters,quotes[*apt-get update && apt-get install -y curl*]
1022+
root@5ed84681fdf8:/src# pass:specialcharacters,quotes[*apt-get update && apt-get install -y curl*] #<1>
10231023
Get:1 pass:[http://deb.debian.org/debian] bookworm InRelease [151 kB]
10241024
Get:2 pass:[http://deb.debian.org/debian] bookworm-updates InRelease [52.1 kB]
10251025
[...]
@@ -1029,7 +1029,7 @@ Reading state information... Done
10291029
The following additional packages will be installed:
10301030
libbrotli1 libcurl4 libldap-2.5-0 libldap-common libnghttp2-14 libpsl5
10311031
[...]
1032-
root@5ed84681fdf8:/src# pass:quotes[*curl -iv http://localhost:8888*]
1032+
root@5ed84681fdf8:/src# pass:quotes[*curl -iv http://localhost:8888*] #<2>
10331033
* Trying 127.0.0.1:8888...
10341034
* Connected to localhost (127.0.0.1) port 8888 (#0)
10351035
> GET / HTTP/1.1
@@ -1057,6 +1057,15 @@ HTTP/1.1 200 OK
10571057
</html>
10581058
----
10591059

1060+
// CSANAD: I think the readers' inputs were a little difficult to spot, so I added some in-
1061+
// structions (and they kept causing a "no callout found for..." error, so I'll just leave
1062+
// them here as comments:
1063+
// <1> First we have to install `curl` as it isn't available in the `slim` images by default.
1064+
//
1065+
// <2> Then, we check whether we are able to request the site.
1066+
1067+
1068+
10601069
That's definitely some HTML! And the `<title>To-Do lists</title>` looks like it's our html, too.
10611070

10621071
So, we can see Django is serving our site _inside_ the container,

0 commit comments

Comments
 (0)