turnbullpress / dockerbook-code

The code and configuration examples from The Docker Book (http://www.dockerbook.com)
930 stars 581 forks source link

wget commands to github fail - Chapter 5, listings 5.18 #72

Open tomperrine opened 4 years ago

tomperrine commented 4 years ago

When using wget as shown in figure 5.18 and similar, the bottom dirs (bin and lib) are downloaded as single files instead of being recursed into.

Script started on 2020-07-12 19:08:37+00:00 tom@docker-herder:~/git-work/docker-book/sinatra$ pwd /home/tom/git-work/docker-book/sinatra tom@docker-herder: ~/git-work/docker-book/sinatra$ ls -l total 4 -rw-rw-r-- 1 tom tom 294 Jul 12 14:55 Dockerfile -rw-rw-r-- 1 tom tom 0 Jul 12 19:08 typescript tom@docker-herder: ~/git-work/docker-book/sinatra$ wget --cut-dirs=7 -nH -r -e robots=off --reject="index.html","Dockerfile" --no-parent https://github.com/turnbullpress/dockerbook-code/tree/master/code/5/sinatra/webapp --2020-07-12 19:08:50-- https://github.com/turnbullpress/dockerbook-code/tree/master/code/5/sinatra/webapp Resolving github.com (github.com)... 140.82.114.3 Connecting to github.com (github.com)|140.82.114.3|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: ‘webapp’ webapp 2020-07-12 19:08:50 (448 KB/s) - ‘webapp’ saved [75941]

--2020-07-12 19:08:50-- https://github.com/turnbullpress/dockerbook-code/tree/master/code/5/sinatra/webapp/bin Reusing existing connection to github.com:443. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: ‘webapp/bin’ webapp/bin 2020-07-12 19:08:51 (881 KB/s) - ‘webapp/bin’ saved [73756]

--2020-07-12 19:08:51-- https://github.com/turnbullpress/dockerbook-code/tree/master/code/5/sinatra/webapp/lib Reusing existing connection to github.com:443. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: ‘webapp/lib’ webapp/lib 2020-07-12 19:08:51 (5.71 MB/s) - ‘webapp/lib’ saved [73888]

FINISHED --2020-07-12 19:08:51-- Total wall clock time: 1.5s Downloaded: 3 files, 218K in 0.3s (841 KB/s) tom@docker-herder: ~/git-work/docker-book/sinatra$ ls -lR .: total 8 -rw-rw-r-- 1 tom tom 294 Jul 12 14:55 Dockerfile -rw-rw-r-- 1 tom tom 0 Jul 12 19:08 typescript drwxrwxr-x 2 tom tom 4096 Jul 12 19:08 webapp

./webapp: total 152 -rw-rw-r-- 1 tom tom 73756 Jul 12 19:08 bin -rw-rw-r-- 1 tom tom 73888 Jul 12 19:08 lib tom@docker-herder: ~/git-work/docker-book/sinatra$ file webapp webapp/: directory tom@docker-herder: ~/git-work/docker-book/sinatra$ file webapp/lib webapp/lib: HTML document, UTF-8 Unicode text, with very long lines

Script done on 2020-07-12 19:09:18+00:00

tomperrine commented 4 years ago

Apologies - Ubuntu 20.04 LTS

doojin commented 4 years ago

same problem, any update on this?

dheveng commented 4 years ago

did anyone get this work? im having the same issues

/dheven

csmall commented 1 year ago

Not the most ideal way but a work-around is to clone the repository and copy the files. e.g. if you were trying to get the webapp_redis to do section 5.2.3

git clone https://github.com/turnbullpress/dockerbook-code.git
[... lots of download messages ...]

cd sinatra
cp -r ../dockerbook-code/code/5/sinatra/webapp_redis .