jeff.nickoloff (9) [Avatar] Offline
#1
If you've read a chapter and something seems wrong, or I missed an opportunity to explain something better I'd love to hear from you.

Post a quick description of the question you have, what section you were reading, and any terms or specific excerpts that might have created the confusion.

Thanks for your patience.

Jeff
larrycai (20) [Avatar] Offline
#2
Re: Post Questions or Confusions Here
Hi Jeff:

P13: better add "docker commit" in Figure 1.8

From base image to new image, it will be nice to indicate "docker commit" in figure

P14: Docker CLI running place (Last chapter in P14 and Figure 1.11 in P15)

I little doubt that the docker CLI running in native host, it is possible, but it is not so common. like boot2docker, I do believe "docker cli" command in running in VM instead of host Windows environment. The existing in host windows environment is only boot2docker CLI

BTW: nice book, I bought it quickly when I see the announcement from newsletter.

rgs/larry
jeff.nickoloff (9) [Avatar] Offline
#3
Re: Post Questions or Confusions Here
Thanks for the notes Stephen. Today I'm working on a test fit of the container-ship metaphor in the first chapter.
jeff.nickoloff (9) [Avatar] Offline
#4
Re: Post Questions or Confusions Here
Thanks Larry. Good spot on Figure 1.8. I think I'm going to end up reworking that a bit anyway based on some other feedback.

The Boot2Docker project makes a few topics in this book particularly difficult. Because there are so many classes of setups that readers are using, it is tough to give guidance for exactly where each component will be running. It is going to get particularly hairy in the next few chapters where boot2docker users will be dealing with volumes.

My general strategy has been to write the book for the most cross-cutting case, linux shell, and then include breakouts when instructions are required for specializations. When working with volumes, I think the best thing to do will be to instruct readers to use "boot2docker ssh" so that they can work from the Linux shell and work with volumes there. Mounting volumes across that VirtualBox layer is a whole other topic. I'll dig up the best resources I can find and provide them, but I don't want to derail the focus on Docker.

Thanks again,

Jeff
larrycai (20) [Avatar] Offline
#5
Re: Post Questions or Confusions Here
Thanks, some experience for boot2docker as reference

In my company, the working env is Windows, so the boot2docker is the best way for us. And from 1.3.0, it automatically mount the windows user home directory inside, which makes end-user transparency for this.

most of us never use `boot2docker ssh` command since that shell lack of features, we mostly use favorite shell terminal (like mebaxterm) to ssh into VM.

Just for reference, eager to see more chapters (surely read your article in Docker newsletter as well)

Well done.

Larry
larrycai (20) [Avatar] Offline
#6
Re: Post Questions or Confusions Here
Chapter 2.5.2 add `docker exec` example

with the new release, `docker exec` command is introduced, it could be added in the section to let readers come into container to understand more, like `ps` inside to know nginx is really running there smilie

larry
larrycai (20) [Avatar] Offline
#7
Re: Post Questions or Confusions Here
Chapter 3.4 add docker import with base images

not sure whether you will touch this in other chapter. one common question I was asked for docker is how to install the OS from ISO.

So it will be good to touch this in early chapter to show how it works to create base image, also docker import/export command can be explained here to show the difference with save/load

Thanks.

Larry
larrycai (20) [Avatar] Offline
#8
Re: Post Questions or Confusions Here
Section 3.5.2

For the layer relationships, I always prefer to use "docker images --tree" to quickly visualize them. And though it is stated deprecated, it will not disappear when good solution come out, see https://github.com/docker/docker/pull/5001

Just for reference.

Larry
verhagen (34) [Avatar] Offline
#9
Re: Post Questions or Confusions Here
Page 25 / 26

Text This will display a table with several details about the installed images on your computer. The output should look similar to the table in Figure 2.6.

Remark The text says Figure 2.6, where the figure is marked as Figure 2.8

About the Figure If people really follow the examples, it will show 2 images:
REPOSITORY TAG ...
nginx latest ...
allingeek/hello_world latest ...
verhagen (34) [Avatar] Offline
#10
Re: Post Questions or Confusions Here
See message above.

Page 26

Text At this point there should be a single row with “nginx” in the REPOSITORY column.

Remark It shows 2 rows, one with nginx and one with allingeek/hello_world
John Slankas (1) [Avatar] Offline
#11
Re: Post Questions or Confusions Here
More of a suggestion ....

In Section 3.4.2, Working with Images as Files
You suggest specifying the filename with a .tar suffix. I would prefer to see the community adapt some type of naming convention for this instead such that the type of the file is more readily recognized. Many other vendors/technologies do this with archive-type files (Microsoft, Apple, Java, ...). Possible use .dar (docker archive) or .di (docker image) instead.
Diederik de Haas (1) [Avatar] Offline
#12
From paragraph 3.3:
If you want to create an interactive container, manually start a process inside of that
container and then detach your terminal, you can do so by holding down the Crtl (or control)
key and pressing P and then Q.

The sequence of commands is not clear here.
Do I have to press Ctrl (<-typo) and then Shift and p (since it's a capital P). Do I then have to release the Ctrl before pressing (Shift) q?
I figured out that it's Ctrl+pq and I believe the notation I used is the standard way to describe the key sequence to use.
Even if it's not, it's probably a good idea to have a section at the beginning of the book which describes exactly how a certain key sequences described in the book translate to your keyboard.

Optionally: describe that docker ps will then show you the generated name which you can then use with docker attach <name> to get back into your running container (and you have to press <Enter> to actually see your prompt).
jeff.nickoloff (9) [Avatar] Offline
#13
Larry, thanks for the great suggestions. I'll be sure to pull those in with the next version.

Verhagen, good catch.

John, I think that might be a valuable convention. I think that the use of a different extension would help differentiate the image files in a general context. However in most situations where these are being shuffled around, the context of the operation would be hint enough of their contents and purpose. I'm not sure that pointing to the practices of Microsoft, Apple, or Java are reason enough to specialize. In any case, I'd like to make this change. Thanks for the suggestion.

Diederik, great feedback. I'll clean that up a bit and refine the explanation. This is one of the things that I found really difficult to parse in the docker.com docks.
Dejan Ilic (2) [Avatar] Offline
#14
I'd like to see Docker vs Linux LXC (and other UNIX container technologies) better explained.
As it is now, I can see that LXC is mentioned a few times, but the what does Docker offer compared to straight LXC containers?

Is Docker a complement? Or "built on top of LXC", is it dependant on LXC or ...
Peter Connolly (5) [Avatar] Offline
#15
2.1.2 - Software example would be more effective
Instead of the labored analogy with a parking lot, why not just describe "classpath hell" as a real, substantive example of conflicting dependencies?
Peter Connolly (5) [Avatar] Offline
#16
Listings 2.10 & 2.17 (Linked Containers)
I suggest including a diagram in the text following listing 2.10 and listing 2.17 that shows the relationship between components in the container.
Peter Connolly (5) [Avatar] Offline
#17
Nice work so far!
I'm enjoying your book so far. Can't wait for the next chapters...

/pc
tgilber (7) [Avatar] Offline
#18
Enjoying the book so far.

I had some trouble with the password hunt, without giving anything away I feel that the output of the image that generates the answer should be more explicit that this is the answer. Password: 'sha1' for example. I spent a lot of time trying to attach to that container that simply exits thinking I had to see the logs or what have you.

mech (4) [Avatar] Offline
#19
Since this is an "In Action" book, I would love the author to recommend some workflow on Docker like the "Immutable Infrastructure" concept. When I started using Docker to serve web app, I am not sure how I am going to "update" my webapp when there is new Git commit. Some uses host to store the source code, some uses ONBUILD instruction to do the source code, some just throw away everything and do a rebuild. It is quite confusing which approach is the right now.

Reading more I now think that a complete throwaway is the right approach, but seem wasteful also. How about all those images left behind? Will my "docker images" list out many images that are hard to see in the future.
322672 (3) [Avatar] Offline
#20
Hello

I'm not clear on the use of the --link option in Chapter 2. (I have only read Chapter 1 and 2)

I believe this is used such that one docker container can access another?

If this is true then how would this work in a distributed environment with docker containers that are dependent on containers that do not reside on the same host?

Thanks
Ian
vimalkansal (33) [Avatar] Offline
#21
Hi Jeff,

I am having some trouble having mounting host directory as a data volume in a container. So here is what I am doing :

On the docker host I become the root user by executing "su -"
Then I create a folder on docker host e.g. /root/testVolume
In the testVolume folder I create a text file and enter some test text in it. file is saved test.txt
Then I create the container like :

docker run -it --name vimal1 -v /root/testVolume:/workspace busybox:latest /bin/sh
I get a terminal to the container and I can cd to workspace. But the moment I execute ls - inside workspace, I am getting following error :

[root@localhost ~]# docker run -it --name vimal1 -v /root/testVolume:/workspace busybox:latest /bin/sh
/ # cd workspace/
/workspace # ls -l
ls: can't open '.': Permission denied
total 0
/workspace #

vimalkansal (33) [Avatar] Offline
#22
It appears, it was a SELinux issue. For the time being I got around it by disabling selinux on host by executing "setenforcing 0". I would suggest a chapter on security/permissions issue will be nice to have.
vimalkansal (33) [Avatar] Offline
#23
Sorry, my bad. I had not reached the chapter 6 on security issues.
jockeyshortz (2) [Avatar] Offline
#24
Question: On a OS X 10.8.5 How does one run boot2docker.app without changing permissions on the directory /usr/local/bin ?
The Applescript in boot2docker.app opens up a bunch of terminal windows for each docker command that fail because the script
even when I run it as root in a terminal window cannot access /usr/local/bin?
Thank you
------
/Applications/boot2docker.app/Contents/Resources/Scripts/main.scpt
See script below
-------
tell application "Terminal"
set newWindow to do script
set windowTitle to "Boot2Docker for OSX"
set title displays custom title of newWindow to true
set b2d to "/usr/local/bin/boot2docker"
do script "bash" in newWindow
set custom title of newWindow to windowTitle
activate
do script "unset DYLD_LIBRARY_PATH ; unset LD_LIBRARY_PATH" in newWindow
do script "mkdir -p ~/.boot2docker" in newWindow
do script "if [ ! -f ~/.boot2docker/boot2docker.iso ]; then cp /usr/local/share/boot2docker/boot2docker.iso ~/.boot2docker/ ; fi" in newWindow
do script b2d & " init " in newWindow
do script b2d & " up " in newWindow
do script "$(" & b2d & " shellinit)" in newWindow
do script "docker version" in newWindow
end tell
366551 (1) [Avatar] Offline
#25
In MEAP v8, Listing 4.7 does not correspond to the text describing it.

The listing shows that container bundle2 creates 2 new managed volumes, but does not reference the volumes from container bundle1. The listing also shows container consumer referencing volumes from both bundle1 and bundle2.

The accompanying text describes the listing as showing that bundle2 copies all the volumes from bundle1, and that consumer copies all the bundles from bundle2 (thereby indirectly copying all the volumes from bundle1).
367822 (6) [Avatar] Offline
#26
Chapter 7 example images are missing completely. I searched on docker hub and quay.io under allingeek, dockerinaction, and the specific names. An example would be ch7_packed or ch7_static.

Where are these?
larrycai (20) [Avatar] Offline
#27
Please state the docker version as the book is written in Preface or early place (or indicate somewhere when it happens) to remind readers.

One example, with docker 1.9 is released, docker volume is different

MEAP-v10, P66, Chapter 4

Now the result is (docker 1.9.0 boot2docker)

docker@docker-1:~$  docker inspect -f "{{json .Volumes}}" cass-shared
null





367822 (6) [Avatar] Offline
#28
In chapter 11, you have us bring down the Coffee example. However, your coffee image is broken. The entrypoint.sh file is not marked executable. In the Dockerfile, I tried adding a RUN chmod ugo+x ./entrypoint.sh. When I got rid of the image and rebuilt, it seemed that something in the docker-compose world had cached the content addressable image identifier and always went back to the broken image. I could see that multiple images existed now and at that point, I didn't know how to fix it. This was on Windows 7 with Docker Toolbox and the docker-compose.exe.
yeurch (17) [Avatar] Offline
#29
In chapter 6, the book mentions the --restart parameter that was "discussed in chapter 2". As far as I can see, chapter 2 does not discuss the restart parameter.
vimalkansal (33) [Avatar] Offline
#30
Hi Jeff,

When are you going to add the repositories for Chapter 6 and Chapter 7?

Thx

Vimal
313400 (1) [Avatar] Offline
#31
In section 2.2.2 running the following command gives error:
Command in PDF:

docker run --interactive --tty \ #A
--link web:web \
--name web test \
busybox:latest /bin/sh #B

Actual output:
Error: image library/test:latest not found


Please fix the command to be:
docker run --interactive --tty \ #A
--link web:web \
--name test \
busybox:latest /bin/sh #B

*Notice removal of the "web" after --name. Thanks
Srini
mancocapac (15) [Avatar] Offline
#32
ch4 volumes, ro example typos, pg 64
docker run --name bmweb_ro \
--volume ~/example-docs:/usr/local/apache2/htdocs/:ro \
-p 80:80
httpd:latest


missing -d option and line feed char after port option
10896 (4) [Avatar] Offline
#33
Section 3.3.1 - no java:6?
I ran the example, and there was no image java:6 (docker images)
10896 (4) [Avatar] Offline
#34
Section 3.2.5 - naming mismatch between text and README.md
The directory names in the README.md are incorrect
386453 (10) [Avatar] Offline
#35
On chapter 3 page 53. After installing the following apps, JAVA:6 is not showing up when running docker images. Why?

I'm running Ubuntu 14.04.


ckok@ckok-virtual-machine:~$ docker pull dockerinaction/ch3_myapp
Using default tag: latest
latest: Pulling from dockerinaction/ch3_myapp
193224d99eda: Pull complete
a3ed95caeb02: Pull complete
d5e87c275989: Pull complete
bb8d9a5ecc4e: Pull complete
7490d74f238e: Pull complete
021438acd8d7: Pull complete
4078d18de562: Pull complete
ce37551720d0: Pull complete
d5f21dfddee2: Pull complete
e0d9390e29cd: Pull complete
285eb2cbce99: Pull complete
Digest: sha256:73bbafb618a24ff171b50fb5796d87a8b4190699bc6d500597bd67d51e3f81dc
Status: Downloaded newer image for dockerinaction/ch3_myapp:latest
ckok@ckok-virtual-machine:~$
ckok@ckok-virtual-machine:~$


ckok@ckok-virtual-machine:~$ docker pull dockerinaction/ch3_myotherapp
Using default tag: latest
latest: Pulling from dockerinaction/ch3_myotherapp
193224d99eda: Already exists
a3ed95caeb02: Pull complete
b2cc8f1bc9d6: Pull complete
bb8d9a5ecc4e: Pull complete
7490d74f238e: Pull complete
021438acd8d7: Pull complete
e4c4e5255cbb: Pull complete
a030b8e169aa: Pull complete
c318611236ca: Pull complete
a994304b5bce: Pull complete
3bc3fe12e21b: Pull complete
Digest: sha256:4abb3cbaf8793034df4edb47c16ef5c22820ba5d0f120fd21864c8cc0b578957
Status: Downloaded newer image for dockerinaction/ch3_myotherapp:latest


* No java:6 images shown!

ckok@ckok-virtual-machine:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest 94df4f0ce8a4 42 hours ago 967 B
busybox latest 47bcc53f74dc 5 weeks ago 1.113 MB
dockerinaction/ch3_myapp latest a62e1f678670 12 months ago 420 MB
dockerinaction/ch3_myotherapp latest 68dcbe3ab484 12 months ago 420.1 MB
ckok@ckok-virtual-machine:~$
372001 (4) [Avatar] Offline
#36
Chapter 2.5.1. script Agent: Connection refused
I ran the script and the agent is not showing when issueing docker ps.

Docker logs of image "dockerinaction/ch2_agent" = lonely_babbage shows:
$ docker logs lonely_babbage
nc: can't connect to remote host (172.17.0.4): Connection refused


Is there something wrong?

The docker ps -a is:
$ docker ps -a
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                      PORTS                   NAMES
a78a8a380d4c        dockerinaction/ch2_agent    "/watcher/watcher.sh"    24 minutes ago      Exited (0) 25 minutes ago                           lonely_babbage
04b934feff8a        wordpress:4                 "/entrypoint.sh apach"   24 minutes ago      Up 25 minutes               0.0.0.0:32770->80/tcp   determined_bhaskara
0969e0371425        dockerinaction/ch2_mailer   "/mailer/mailer.sh"      24 minutes ago      Up 25 minutes               33333/tcp               evil_shockley
5eb76309170b        mysql:5                     "docker-entrypoint.sh"   24 minutes ago      Up 25 minutes               3306/tcp                nostalgic_euclid


The script is ran is:
SQL_CID=$(docker create -e MYSQL_ROOT_PASSWORD=ch2demo mysql:5)
docker start $SQL_CID

MAILER_CID=$(docker create dockerinaction/ch2_mailer)
docker start $MAILER_CID

WP_CID=$(docker create --link $SQL_CID:mysql -p 80 -v /run/lock/apache2/ -v /run/apache2/ -v /tmp/ --read-only wordpress:4)
docker start $WP_CID

AGENT_CID=$(docker create --link $WP_CID:insideweb \
--link $MAILER_CID:insidemailer \
dockerinaction/ch2_agent)

docker start $AGENT_CID

372001 (4) [Avatar] Offline
#37
Chapter 2.5.1. Meaning Readonly
I ran the script at the end of chapter 2.5.1. and Wordpress runs fine. I connected to it in the browser and installed wordpress.
Further I added a plug-in called "contact form 7".

In this paragraph you write:
By using a read-only file system and linking WordPress to another container running a
database, you can be sure that the container running the WordPress image will never
change.


I quess that the plug-in is install on the file system, inside the container.

Here is where the confusion start. When the container is readonly, how can I add a plug-in to it. Normally wordpress stores all plug-ins in the folder /wp-content/plugins/....

Question: what is de meaning of the option "--readonly"?
57702 (6) [Avatar] Offline
#38
In 4.1.2, you indicate that volumes make us benefit of persisitence. I am using Docker Toolbox on windows.
1st question, I understand that a volume is a mount point, where is this mount point? on the win host or inside the docker VM?
57702 (6) [Avatar] Offline
#39
I am using Docker toolbox, so a VM is created to run containers. On the command line, when I do "ls" a list of my C.....\user directories and files are listed.
The question is how I can do ls to list the VM directory tree?
225464 (3) [Avatar] Offline
#40
386453 wrote:On chapter 3 page 53. After installing the following apps, JAVA:6 is not showing up when running docker images. Why?

I'm running Ubuntu 14.04.


ckok@ckok-virtual-machine:~$ docker pull dockerinaction/ch3_myapp
Using default tag: latest
latest: Pulling from dockerinaction/ch3_myapp
193224d99eda: Pull complete
a3ed95caeb02: Pull complete
d5e87c275989: Pull complete
bb8d9a5ecc4e: Pull complete
7490d74f238e: Pull complete
021438acd8d7: Pull complete
4078d18de562: Pull complete
ce37551720d0: Pull complete
d5f21dfddee2: Pull complete
e0d9390e29cd: Pull complete
285eb2cbce99: Pull complete
Digest: sha256:73bbafb618a24ff171b50fb5796d87a8b4190699bc6d500597bd67d51e3f81dc
Status: Downloaded newer image for dockerinaction/ch3_myapp:latest
ckok@ckok-virtual-machine:~$
ckok@ckok-virtual-machine:~$


ckok@ckok-virtual-machine:~$ docker pull dockerinaction/ch3_myotherapp
Using default tag: latest
latest: Pulling from dockerinaction/ch3_myotherapp
193224d99eda: Already exists
a3ed95caeb02: Pull complete
b2cc8f1bc9d6: Pull complete
bb8d9a5ecc4e: Pull complete
7490d74f238e: Pull complete
021438acd8d7: Pull complete
e4c4e5255cbb: Pull complete
a030b8e169aa: Pull complete
c318611236ca: Pull complete
a994304b5bce: Pull complete
3bc3fe12e21b: Pull complete
Digest: sha256:4abb3cbaf8793034df4edb47c16ef5c22820ba5d0f120fd21864c8cc0b578957
Status: Downloaded newer image for dockerinaction/ch3_myotherapp:latest


* No java:6 images shown!

ckok@ckok-virtual-machine:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest 94df4f0ce8a4 42 hours ago 967 B
busybox latest 47bcc53f74dc 5 weeks ago 1.113 MB
dockerinaction/ch3_myapp latest a62e1f678670 12 months ago 420 MB
dockerinaction/ch3_myotherapp latest 68dcbe3ab484 12 months ago 420.1 MB
ckok@ckok-virtual-machine:~$


I have the same issue - any chance of an explanation?
burton (31) [Avatar] Offline
#41
I have a docker installation:

Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 17.09.0-ce-rc2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.49-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934GiB
Name: moby
ID: CYAY:NDK7:QALQ:N6H2:ALXN:H2BW:FI7R:7ZYN:TN2A:YPHZ:KBOI:H3DP
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 16
Goroutines: 25
System Time: 2017-09-19T18:59:08.5296759Z
EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false


But when I run 'docker run dockerinaction/hello_world' I get no response. No error. Nothing. Ideas?
burton (31) [Avatar] Offline
#42
I have the attached simple Dockerfile (this is a Windows docker installation) but when I run it I get:

Sending build context to Docker daemon 2.048kB
Step 1/4 : FROM php:7.0-apache
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

It doesn't seem to matter what my image is building from.
Passo Giau (8) [Avatar] Offline
#43
Hi Jeff,

I'm getting the following error when I run this command from p.59,

ams$ docker run –it --rm --link cass1:cass cassandra:2.2 cqlsh cass1
docker: invalid reference format.
See 'docker run --help'.


It's not even clear what parameter causes the error. I'm on Mac OSX 10.12.6,

Docker version 17.06.2-ce, build cec0b72

Thanks.
422518 (1) [Avatar] Offline
#44
It occurred to me this morning and later I found some command line that can be used.
You need to put the "--rm" after the '--link' option, I have no idea why this happens.


docker run -it --link cass1:cass  --rm cassandra:2.2 cqlsh cass 


My command reference is, https://hub.docker.com/_/cassandra/