Using Docker

Errata for Using Docker

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
PDF
Page 15
Installing on Windows Section

PDF revision: 2016-04-08: Second Release Problem occurs using: Docker on Windows 7 Pro Docker version: 1.11.2 Docker-compose version: 1.7.1 If you are using Docker on MS-Windows it might be a natural option to create and edit the configuration files using a MS-Windows based editor; Notepad++ for example. This creates a problem with the text encoding (ANSI/UTF-8) and EOL markers (End of Line). It will stop the linux image and docker from running the cmd.sh based exercises. This is easy to see with the 'cat -A' command (^M for EOL) and easy to solve with the 'dos2unix' command; both available in the MINGW64 Docker Quickstart shell. It might help the beginner if there is a small paragraph within the MS-Windows install section regarding this 'compatibility' issue. Cheers,

Note from the Author or Editor:
I've added a short note about this.

Anonymous  Jun 12, 2016  Aug 12, 2016
PDF
Page 15
1st command line example

The instructions for running without sudo state: "On Ubuntu, you should be able to do the following: $ sudo usermod -aG docker" However, that command does not work as usermod requires the username to modify as its final argument. The command should be: $ sudo usermod -aG docker username e.g. $ sudo usermod -aG docker paul

Note from the Author or Editor:
The command currently reads: $ sudo usermod -aG docker It should read $ sudo usermod -aG docker $USER I have made the changes to the book source.

Paul Waring  Aug 28, 2016 
Printed
Page 31
Middle of page

"the containers ID" should be "the container's ID"

Note from the Author or Editor:
Change "the containers ID" to the "container's ID"

Dean Stanton  Jan 18, 2016  Apr 08, 2016
Printed
Page 38
Last full paragraph

"there also alternatives" should be "there are also alternatives"

Note from the Author or Editor:
Replace "there also alternatives" with "there are also alternatives"

Dean Stanton  Jan 18, 2016  Apr 08, 2016
Printed
Page 40
2nd paragraph

"specified-if" contains a hyphen. It should be a dash, forming a pair with the other dash. (I don't know why you still have a typewriter-style two-hyphen dash later, rather than an em-dash.) And immediately below that is a heading containing "+/+" where it should read " / ".

Note from the Author or Editor:
The second paragraph needs to be reformatted to use em dashes rather than hypens.

Dean Stanton  Jan 18, 2016  Apr 08, 2016
Printed
Page 40
Paragraph starting "a git repository"

After "github.com/," is "_ git@". I wonder if the underscore should not be there at all (nor in "_git://" following it). If the _ should be there, I imagine no space should separate the underscore and the "git@".

Note from the Author or Editor:
The formatting for italics is wrong on this page. The passage should read "github.com/, git@, or git://." There should be no underscores, but the phrases "github.com/" "git@" and "git://" should be italicised. The ", or" should not be.

Dean Stanton  Jan 18, 2016  Apr 08, 2016
Printed
Page 42
2nd paragraph (excluding partials and code blocks)

Wrong filename for block code: "When a build fails, it can be very useful to launch the layer before the failure. Here's an example .dockerignore file: <Code block contains code from a Dockerfile, not a .dockerignore file>" This example works fine if you create a Dockerfile (not a .dockerignore file) from the code block.

Note from the Author or Editor:
Submitter is correct. Fixed by author.

Anonymous  Jun 22, 2016  Aug 12, 2016
Printed
Page 44
4th paragraph

"packager manager" should be "package manager"

Note from the Author or Editor:
Replace "still has an extensive packager manager" with "still has an extensive package manager"

Dean Stanton  Jan 18, 2016  Apr 08, 2016
Printed
Page 45
Footnote

Though this footnote correctly says, "a unikernel approach," it also incorrectly uses "an" in "an unikernel architecture".

Note from the Author or Editor:
Replace "In an unikernel architecture" with "In a unikernel architecture".

Dean Stanton  Jan 18, 2016  Apr 08, 2016
ePub
Page 46
Bottom of page after numbered bullet list

The ids in the text don't match the example they reference: “...not the ID of the last container (e4b31d0550cd):” but the example shows f63045cc086b. Also on the immediate following page, the reference to the image id is incorrect (was 85b49a851fcc) but the displayed example command line says: “$ docker run -it 7831e2ca1809 / # /bin/bash -c "echo hmm" /bin/sh: /bin/bash: not found / # /bin/sh -c "echo ahh!" ahh! / #” and that id is no where to be found.

Note from the Author or Editor:
The IDs in the text need to be changed to match the example. Note the container ID is correct, but the image ID needs to change in the text and in the code. The correct text is: While, in this case, the problem is fairly clear from the error, we can run the image created from the last successful layer in order to debug the instruction. Note that we are using the last image ID here (85b49a851fcc), not the ID of the last container (e4b31d0550cd): $ docker run -it 85b49a851fcc / # /bin/bash -c "echo hmm" /bin/sh: /bin/bash: not found / # /bin/sh -c "echo ahh!" ahh! / #

Christopher Haupt  Jan 21, 2016  Apr 08, 2016
Printed
Page 50
Code Sample

The first character is missing in the output from the "docker run --link..." command. The text currently reads: ATH=/usr/local/sbin:/... It should read: PATH=/usr/local/sbin:/... (Thanks to Alex Ott for bringing this to my attention).

Adrian Mouat
Adrian Mouat
 
Feb 28, 2016  Apr 08, 2016
Printed
Page 50
Final paragraph

The sentence should start with a capital letter.

Adrian Mouat
Adrian Mouat
 
Feb 28, 2016  Apr 08, 2016
Printed
Page 51
Third paragraph

"if the linked container replaced" should have "is" so it reads "if the linked container is replaced."

Note from the Author or Editor:
Change "if the linked container replaced" to "if the linked container is replaced"

Dean Stanton  Jan 18, 2016  Apr 08, 2016
Printed
Page 51
docker export paragraph

"inlcuded" should be "included".

Note from the Author or Editor:
Page number is actually 64. Replace "inlcuded" with "included".

Dean Stanton  Jan 18, 2016  Apr 08, 2016
Printed
Page 66
bullet (4)

The URL given reads http://myregistry.com:5000.(((range="endofrange",startref="ix_04_docker_fundamentals-asciidoc23")))(((... I suspect these were cross-references meant to be substituted?

Note from the Author or Editor:
Yes, something has gone wrong with the formatting here. The text after URL should be removed.

Chris Chang  Feb 26, 2016  Apr 08, 2016
Printed
Page 74
last (boldface) command and 2 places in last paragraph

Consider replacing "$(pwd)" with "$PWD" as the (sh, dash, bash) shell knows the current directory without invoking a sub-shell, so this is faster and simpler. (The quotation marks are only needed if the directory name contains spaces, but it could.)

Note from the Author or Editor:
Replace: "$(pwd)" with "$PWD" Keeping the quotes.

Dean Stanton  Jan 18, 2016  Apr 08, 2016
Mobi
Page 74
4th paragraph

Also, we’ve asked uWSGI to expose some stats which you can see at https://localhost:9191. With the setup that we have here, it seems that we cannot use https but http only

Note from the Author or Editor:
Please change https://localhost:9191 to http://localhost:9191

Samuel Prette  Oct 28, 2015  Apr 08, 2016
Printed
Page 75
end of 1st paragraph

"specificed" should be "specified".

Note from the Author or Editor:
Replace "when it isn't specificed exactly" with "when it isn't specified exactly"

Dean Stanton  Jan 18, 2016  Apr 08, 2016
Printed
Page 78
Tip Section

The text in the tip section starts with rs","inside containers"))) and I assume this is related to the markup of the title and should be removed. I assume the section should start with the text "The Linux kernel...".

Note from the Author or Editor:
Remove formatting error from indexing at top of page.

Anonymous  Jan 16, 2016  Apr 08, 2016
Printed
Page 81
4th code prompt on page

"unning Development Server" --> "Running Development Server" ?

Note from the Author or Editor:
This has already been addressed in newer editions of the book.

Chris Chang  Apr 22, 2016  Aug 12, 2016
Printed
Page 81
1st paragraph under "Automating with Compose"

5th line , "rolling thier own" -> "rolling their own"

Note from the Author or Editor:
This is already fixed in new editions.

Chris Chang  Apr 22, 2016  Aug 12, 2016
PDF
Page 81-82
page cutoff

The example yaml code is split between the two pages. Thus the indentation is not quite clear. I was not indenting the 'ports', 'environment' or 'volumes' tags and I was getting an error. It took me about an hour searching for a solution to realize my lack of indentation. Should the yaml code just be on a single page? It is my humble opinion that the answer to that question is yes.

Note from the Author or Editor:
Yes, this is particularly annoying given it's such a short piece of code. In editing please ensure this sample is kept all on one page.

Marco Hemken  May 06, 2016  Aug 12, 2016
PDF, ePub
Page 88
within the code snippet

The name of the method name changes compared to the last code snippet on page 87, but this change isnt highlighted. @app.route('/') def get_identicon(): name = default_name header = '<html><head><title>Identidock</title></head><body>' body = '''<form method="POST"> Hello <input type="text" name="name" value="{}"> <input type="submit" value="submit"> </form> <p>You look like a: <img src="/monster/monster.png"/> '''.format(name) footer = '</body></html>' return header + body + foote Before the change this method is called 'get_identicon'. after this method is renamed to 'mainpage' and there is a new method called 'get_identicon'

Note from the Author or Editor:
The correct fix is to change "get_identicon()" in the previous code listing on page 87 to "mainpage()".

Hassan Khalid  Dec 25, 2015  Apr 08, 2016
PDF
Page 90
2nd to last paragraph

The 2nd to last paragraph says... """ At this point, you should stop and remove the containers we launched earlier3 and run docker-compose up -d. You should now have the app running again and be able to update the code without needing to restart the containers. """ I lost an hour or so because I didn't realize I needed to issue the command `docker-compose build` prior to doing `docker-compose up`. I just hadn't grokked the workflow well enough to that point to know I needed to do that. I think it would help most readers to have a quick parenthetical there reminding them not to forget to `build` before doing the `up`.

Note from the Author or Editor:
Yes, this is a mistake. If you don't run `docker compose build`, Compose will use an old version of the container. The paragraph: At this point, you should stop and remove the containers we launched earlier and run docker-compose up -d. You should now have the app running again and be able to update the code without needing to restart the containers. Should be reworded to: Before starting the application we need to remove any old containers: $ docker rm $(docker stop ps -q) ... Note that this command will stop all running containers, not just the identidock ones. We can then rebuild and run the application with Compose: $ docker-compose build ... $ docker-compose up -d ... The app should now be running again and the code can be updated without needing to restart the containers.

Anonymous  Jan 19, 2016  Apr 08, 2016
PDF
Page 90
4th paragraph

PDF revision: 2016-04-08: Second Release Problem occurs using: Docker on Windows 7 Pro Docker version: 1.11.2 Docker-compose version: 1.7.1 Removing old containers: docker rm $(docker stop ps -q) is a typo. It should be: docker rm $(docker stop $(docker ps -q)) Cheers,

Note from the Author or Editor:
Submitter is correct. Author has made this change.

Anonymous  Jun 12, 2016  Aug 12, 2016
Printed
Page 111
4th paragraph (at the right of the second line)

"and the and" should be "and the".

Note from the Author or Editor:
Replace "and the and CoreOS" with "and the CoreOS".

Dean Stanton  Jan 18, 2016  Apr 08, 2016
Printed
Page 118
Last paragraph

Parenthetical remark shows "docker-compose build" but the example command above invokes "docker build". (Since both have build commands, this is potentially confusing.)

Note from the Author or Editor:
The text is correct as written, but could benefit from clarification. Change the text "(remember to run docker-compose build)" to "(remember to run `docker-compose build` to ensure Compose uses the new code)

Dean Stanton  Jan 18, 2016  Apr 08, 2016
Printed
Page 126
Introduction to numbered steps

"Open the Jenkins web interface" could be more explicit (in the text or in a footnote): (http://localhost:8080/ on the controlling host)

Note from the Author or Editor:
Change "Open the Jenkins web interface and ..." to "Open the Jenkins web interface running at http://localhost:8080 and..."

Dean Stanton  Jan 18, 2016  Apr 08, 2016
Printed
Page 147
first sentence

COMPOSE should be COMPOSE_FILE Also, this sentence confuses environment variable and a shell variable; the sample command should start with "export ".

Note from the Author or Editor:
Replace "COMPOSE environment variable" with "COMPOSE_FILE environment variable" and the example with: $ export COMPOSE_FILE=prod.yml $ docker-compose up -d ... (Note that the original text is also missing a dash between docker and compose).

Dean Stanton  Jan 19, 2016  Apr 08, 2016
Printed
Page 147
end of box

"k VIRTUAL_HOST" has a spurious "k "

Note from the Author or Editor:
Remove the extra letter "k" from "k VIRTUAL_HOST" in "Supercharged Config File Generation"

Dean Stanton  Jan 19, 2016  Apr 08, 2016
PDF
Page 147
1st paragraph under "Supercharged Con g File Generation"

I believe "Jinga2", in reference to a proper template processor, should be "Jinja2"

Note from the Author or Editor:
Submitter is correct, Jinga2 should be Jinja2. This has been fixed by the author.

Freark van der Bos  Jul 23, 2016  Aug 12, 2016
Printed
Page 149
paragraph above numbered list

IMHO, "directly in to" should be "directly into"

Note from the Author or Editor:
Yes, change "in to the remote server" to "into the remote server"

Dean Stanton  Jan 19, 2016  Apr 08, 2016
Printed
Page 154
3rd paragraph

"making the most the" should be "making the most of".

Note from the Author or Editor:
Change "making the most the Ansible" to "making the most of Ansible"

Dean Stanton  Jan 19, 2016  Apr 08, 2016
Printed
Page 163
first line

"nodeo" should be "node".

Note from the Author or Editor:
Change nodeo to node on pg 163.

Dean Stanton  Jan 19, 2016  Apr 08, 2016
Printed
Page 168
Bulleted issue list

In addition to potential saving of the environment, the docker run -e technique of assigning the environment variable is inherently insecure on any shared host. Commands and their args are usually available to others on the host via ps.

Note from the Author or Editor:
Add the following sentence below the code example: Variables can also be passed in via a file, which has the advantage of keeping them from appearing in shell history or the output of the `ps` command: $ cat pass.txt API_TOKEN=my_secret_token $ docker run -d --env-file ./pass.txt myimage

Dean Stanton  Jan 19, 2016  Apr 08, 2016
Printed
Page 169
example source command

Whatever you intended for the scripting example, this isn't it. Sourcing the file produces no output (so nothing is appended). Maybe you want cat /secret/env.sh >> run_my_app.sh though adding it to the end of the file is unlikely to be helpful, either. If I were doing this, I would have my run_my_app.sh script source /secret/env.sh

Note from the Author or Editor:
This is a formatting error. The text `&&` has been accidentally changed to `>>`.

Dean Stanton  Jan 19, 2016  Apr 08, 2016
Printed, PDF
Page 174
First line of code on page.

The i/o redirect portion on the first line of code on the page incorrectly uses ">>2" instead of ">&2". To produce the desired results replace the line with: $ docker run --name logtest debian sh -c 'echo "stdout"; echo "stderr" >&2'

Note from the Author or Editor:
The code should read: $ docker run --name logtest debian sh -c 'echo "stdout"; echo "stderr" >&2' Not: $ docker run --name logtest debian sh -c 'echo "stdout"; echo "stderr" >>2' This was caused by an issue with HTML entities when porting between versions of atlas. This has been fixed.

Eytan H  May 08, 2016  Aug 12, 2016
Printed, PDF
Page 182
Chapter 10, multiple pages

On page 182 and many others after, using the image kibana:4 and elasticsearch:1.7 yields this warning upon opening Kibana at http://HOST:5601/app/kibana: "This version of Kibana requires Elasticsearch ^2.3.0 on all nodes. I found the following incompatible nodes in your cluster: Elasticsearch v1.7.5 @ inet[/172.17.0.3:9200] (172.17.0.3)". The solution is to instead use the kibana:4.0 image. This chapter is REALLY BAD when it comes to using consistent image tags that will continue to work over time. For example on page 179 it says to use the image "logstash", whereas on page 182 it magically changes to "logstash:1.5". Rather than submitting a bunch of errata I think it'd make more sense to quickly walk through the chapter. I'd be happy to assist, just drop me an email.

Note from the Author or Editor:
The quick fix is to replace all instances of "kibana:4" with "kibana:4.0" in Chapter 10. As suggested by the submitter, the correct fix is to go through all image tags and replace with more specific versions, which will be done by the author in a future version.

Eytan H  May 11, 2016  Aug 12, 2016
Printed
Page 212
listed codes

I run the code listed on the page, docker returns error 'docker: Error response from daemon: oci runtime error: exec: "-name": executable file not found in $PATH.'. docker run -d -p 4001:4001 -p 2380:2380 -p 2379:2379 \ --name etcd quay.io/coreos/etcd \ -name etcd-1 -initial-advertise-peer-urls http://${HOSTA}:2380 \ ...(snip) etcd container of the 2.3.0 or later repository does not seem to work. I found that version 2.2.x does work, so we need to specify a tag to the etcd repository as follows. docker run -d -p 4001:4001 -p 2380:2380 -p 2379:2379 \ --name etcd quay.io/coreos/etcd:v2.2.5 \ -name etcd-1 -initial-advertise-peer-urls http://${HOSTA}:2380 \ ...(snip)

Note from the Author or Editor:
In both places where etcd is started in a docker command, a version needs to be used i.e change: quay.io/coreos/etcd to quay.io/coreos/etcd:v2.2.5 This change has been made to the book source.

otsuka  Aug 28, 2016 
Printed
Page 214
Second code sample

The wrong host is used the example code. The text currently reads: $ curl -s http://$HOSTA:2379/... It should read: $ curl -s http://$HOSTB:2379/... (Thanks to Alex Ott for brining this to my attention)

Adrian Mouat
Adrian Mouat
 
Feb 28, 2016  Apr 08, 2016
Printed
Page 246
First code example

The wrong host is referenced in the example. The text currently reads: root@calico-2:~# sudo ./calicoctl node --ip=<calico-1 ipv4> It should read: root@calico-2:~# sudo ./calicoctl node --ip=<calico-2 ipv4> (Thanks to Alex Ott for bringing this to my attention)

Adrian Mouat
Adrian Mouat
 
Feb 28, 2016  Apr 08, 2016
Printed
Page 262
3rd paragraph, immediately after code example

The wrong domain name is used. The text currently reads: This tells SkyDNS that it is responsible for the skydns.local domain. It should read: This tells SkyDNS that it is responsible for the identidock.local domain. Thanks to Alex Ott for bringing this to my attention.

Adrian Mouat
Adrian Mouat
 
Feb 28, 2016  Apr 08, 2016
Printed
Page 291
2nd sentence

The word "chapter" is misspelled "chpater". Thanks to Alex Ott for bringing this to my attention.

Adrian Mouat
Adrian Mouat
 
Feb 28, 2016  Apr 08, 2016
Printed
Page 305
Third paragraph

The sentence beginning "content trust also provides..." should start with a capital letter.

Adrian Mouat
Adrian Mouat
 
Feb 28, 2016  Apr 08, 2016
Printed
Page 312
First full paragraph

"attach other containers" should be "attack other containers"

Adrian Mouat
Adrian Mouat
 
Feb 28, 2016  Apr 08, 2016
Printed
Page 313
Second paragraph.

The formatting of the find command in the text is incorrect, the + symbol should be in code font and directly next to the word "perm", and there should be a semicolon at the end. The code in the following code sample is correct.

Adrian Mouat
Adrian Mouat
 
Feb 28, 2016  Apr 08, 2016