Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tomperrine opened this issue Jul 12, 2020 · 4 comments
Open

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

tomperrine opened this issue Jul 12, 2020 · 4 comments

Comments

@tomperrine
Copy link

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
Copy link
Author

Apologies - Ubuntu 20.04 LTS

@doojin
Copy link

doojin commented Aug 28, 2020

same problem, any update on this?

@dheveng
Copy link

dheveng commented Nov 25, 2020

did anyone get this work? im having the same issues

/dheven

@csmall
Copy link

csmall commented Apr 13, 2023

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 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants