[GH-ISSUE #133] Docker build fails on Synology NAS #1600

Closed
opened 2026-03-01 17:52:04 +03:00 by kerem · 9 comments
Owner

Originally created by @mawmawmawm on GitHub (Jan 22, 2019).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/133

Hi there,
I was playing around with ArchiveBox yesterday and I tried to install it on my Synology NAS on DSM 6.2.1-23824 Update 4 through docker-compose up -d.
Unfortunately this didn't work out and the build process stopped with this error message:

...
Setting up libgtk2.0-common (2.24.31-2) ...
Setting up fonts-ipafont-gothic (00303-16) ...
update-alternatives: using /usr/share/fonts/opentype/ipafont-gothic/ipag.ttf to provide /usr/share/fonts/truetype/fonts-japanese-gothic.ttf (fonts-japanese-gothic.ttf) in auto mode
Processing triggers for mime-support (3.60) ...
Setting up fonts-tlwg-laksaman-ttf (1:0.6.3-1) ...
Setting up fonts-tlwg-typewriter-ttf (1:0.6.3-1) ...
Setting up libjbig0:amd64 (2.1-3.1+b2) ...
ERROR: Service 'archivebox' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y curl --no-install-recommends     && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -     && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'     && apt-get update     && apt-get install -y chromium fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont       --no-install-recommends     && rm -rf /var/lib/apt/lists/*     && rm -rf /src/*.deb     && ln -s /usr/bin/chromium /usr/bin/chromium-browser' returned a non-zero code: 137
root@NASi:/volume1/docker/archivbox/ArchiveBox-master#

This seems to be related to the Chromium download / install.
Is this something that can be fixed easily by myself or would this require a change to the docker file?

Thanks for this great project, by the way, I really like it. Thanks!

Originally created by @mawmawmawm on GitHub (Jan 22, 2019). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/133 Hi there, I was playing around with ArchiveBox yesterday and I tried to install it on my Synology NAS on `DSM 6.2.1-23824 Update 4` through `docker-compose up -d`. Unfortunately this didn't work out and the build process stopped with this error message: ``` ... Setting up libgtk2.0-common (2.24.31-2) ... Setting up fonts-ipafont-gothic (00303-16) ... update-alternatives: using /usr/share/fonts/opentype/ipafont-gothic/ipag.ttf to provide /usr/share/fonts/truetype/fonts-japanese-gothic.ttf (fonts-japanese-gothic.ttf) in auto mode Processing triggers for mime-support (3.60) ... Setting up fonts-tlwg-laksaman-ttf (1:0.6.3-1) ... Setting up fonts-tlwg-typewriter-ttf (1:0.6.3-1) ... Setting up libjbig0:amd64 (2.1-3.1+b2) ... ERROR: Service 'archivebox' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y curl --no-install-recommends && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && apt-get update && apt-get install -y chromium fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont --no-install-recommends && rm -rf /var/lib/apt/lists/* && rm -rf /src/*.deb && ln -s /usr/bin/chromium /usr/bin/chromium-browser' returned a non-zero code: 137 root@NASi:/volume1/docker/archivbox/ArchiveBox-master# ``` This seems to be related to the Chromium download / install. Is this something that can be fixed easily by myself or would this require a change to the docker file? Thanks for this great project, by the way, I really like it. Thanks!
Author
Owner

@pirate commented on GitHub (Jan 23, 2019):

Ah shoot it looks like I may have to build a new image that supports Chrome better:

I think I'll base it off of https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker
since that seems to be the official way provided by Google Chrome.

Were you able to build it successfully if you comment out/remove the browser install process and just run ./archive with FETCH_PDF,FETCH_SCREENSHOT_FETCH_DOM=False?

<!-- gh-comment-id:456613655 --> @pirate commented on GitHub (Jan 23, 2019): Ah shoot it looks like I may have to build a new image that supports Chrome better: I think I'll base it off of https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker since that seems to be the official way provided by Google Chrome. Were you able to build it successfully if you comment out/remove the browser install process and just run `./archive` with `FETCH_PDF,FETCH_SCREENSHOT_FETCH_DOM=False`?
Author
Owner

@mawmawmawm commented on GitHub (Jan 23, 2019):

Thanks for the quick response.

Were you able to build it successfully if you comment out/remove the browser install process

I need to test this, but it's gonna take a couple days until I can give it a shot. I believe it should work, I'll let you know here.

<!-- gh-comment-id:456620342 --> @mawmawmawm commented on GitHub (Jan 23, 2019): Thanks for the quick response. > Were you able to build it successfully if you comment out/remove the browser install process I need to test this, but it's gonna take a couple days until I can give it a shot. I believe it should work, I'll let you know here.
Author
Owner

@pirate commented on GitHub (Jan 23, 2019):

Actually nvm, I think I fixed it, give master a try now. See e1be96e.

docker-compose up -d

echo 'https://example.com' | docker-compose exec -T archivebox /bin/archive
<!-- gh-comment-id:456682698 --> @pirate commented on GitHub (Jan 23, 2019): Actually nvm, I think I fixed it, give `master` a try now. See e1be96e. ```bash docker-compose up -d echo 'https://example.com' | docker-compose exec -T archivebox /bin/archive ```
Author
Owner

@mawmawmawm commented on GitHub (Jan 23, 2019):

Awesome, thanks for the quick fix. I’ll give it a try as soon as I get a chance.

<!-- gh-comment-id:456893744 --> @mawmawmawm commented on GitHub (Jan 23, 2019): Awesome, thanks for the quick fix. I’ll give it a try as soon as I get a chance.
Author
Owner

@mawmawmawm commented on GitHub (Jan 24, 2019):

Hey there,
we're a step closer I think, but now there's an issue with puppeteer:

...
Setting up google-chrome-unstable (73.0.3679.0-1) ...
update-alternatives: using /usr/bin/google-chrome-unstable to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-unstable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-unstable to provide /usr/bin/google-chrome (google-chrome) in auto mode
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.36.5-2+deb9u2) ...
 ---> 0d257ccce39b
Removing intermediate container d94aae9cef3e
Step 5/15 : ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 /usr/local/bin/dumb-init

 ---> c3d43a6e6959
Removing intermediate container c4c342dbb977
Step 6/15 : RUN chmod +x /usr/local/bin/dumb-init
 ---> Running in 48c6334dce57
 ---> 8738d9e58c74
Removing intermediate container 48c6334dce57
Step 7/15 : RUN npm i puppeteer
 ---> Running in d8c43fd05577
npm ERR! Unexpected end of JSON input while parsing near '...toc":"^1.1.0","minimi'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-01-24T12_28_58_829Z-debug.log
ERROR: Service 'archivebox' failed to build: The command '/bin/sh -c npm i puppeteer' returned a non-zero code: 1

Any idea what this could be? The log file mentioned here didn't exist in this folder

<!-- gh-comment-id:457181076 --> @mawmawmawm commented on GitHub (Jan 24, 2019): Hey there, we're a step closer I think, but now there's an issue with `puppeteer`: ``` ... Setting up google-chrome-unstable (73.0.3679.0-1) ... update-alternatives: using /usr/bin/google-chrome-unstable to provide /usr/bin/x-www-browser (x-www-browser) in auto mode update-alternatives: using /usr/bin/google-chrome-unstable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode update-alternatives: using /usr/bin/google-chrome-unstable to provide /usr/bin/google-chrome (google-chrome) in auto mode Processing triggers for libc-bin (2.24-11+deb9u3) ... Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.36.5-2+deb9u2) ... ---> 0d257ccce39b Removing intermediate container d94aae9cef3e Step 5/15 : ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 /usr/local/bin/dumb-init ---> c3d43a6e6959 Removing intermediate container c4c342dbb977 Step 6/15 : RUN chmod +x /usr/local/bin/dumb-init ---> Running in 48c6334dce57 ---> 8738d9e58c74 Removing intermediate container 48c6334dce57 Step 7/15 : RUN npm i puppeteer ---> Running in d8c43fd05577 npm ERR! Unexpected end of JSON input while parsing near '...toc":"^1.1.0","minimi' npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-01-24T12_28_58_829Z-debug.log ERROR: Service 'archivebox' failed to build: The command '/bin/sh -c npm i puppeteer' returned a non-zero code: 1 ``` Any idea what this could be? The log file mentioned here didn't exist in this folder
Author
Owner

@pirate commented on GitHub (Jan 24, 2019):

Looks like it could be a temporary download issue. Can you try rebuilding one more time.

<!-- gh-comment-id:457343255 --> @pirate commented on GitHub (Jan 24, 2019): Looks like it could be a temporary download issue. Can you try rebuilding one more time.
Author
Owner

@mawmawmawm commented on GitHub (Jan 25, 2019):

I did a rebuild from scratch and this time the step 7/15 worked fine.

I received some warnings for puppeteer though, just FYI:

...
> puppeteer@1.11.0 install /node_modules/puppeteer
> node install.js


Chromium downloaded to /node_modules/puppeteer/.local-chromium/linux-609904
npm WARN saveError ENOENT: no such file or directory, open '/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.

+ puppeteer@1.11.0
added 43 packages from 22 contributors and audited 50 packages in 128.675s
found 0 vulnerabilities
...

Also at the end things did go wrong:

Step 15/15 : CMD /bin/archive
 ---> Running in 0d553c4b34f6
 ---> a72cafb54257
Removing intermediate container 0d553c4b34f6
Successfully built a72cafb54257
Successfully tagged archiveboxmaster_archivebox:latest
WARNING: Image for service archivebox was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating archiveboxmaster_nginx_1 ...
Creating archiveboxmaster_archivebox_1 ...
Creating archiveboxmaster_nginx_1
Creating archiveboxmaster_nginx_1 ... error

Creating archiveboxmaster_archivebox_1 ... error

ERROR: for archiveboxmaster_archivebox_1  Cannot start service archivebox: Bind mount failed: '/volume1/docker/ArchiveBox/ArchiveBox-master/data' does not exists

ERROR: for nginx  Cannot start service nginx: Bind mount failed: '/volume1/docker/ArchiveBox/ArchiveBox-master/data' does not exists

ERROR: for archivebox  Cannot start service archivebox: Bind mount failed: '/volume1/docker/ArchiveBox/ArchiveBox-master/data' does not exists
ERROR: Encountered errors while bringing up the project.
<!-- gh-comment-id:457460821 --> @mawmawmawm commented on GitHub (Jan 25, 2019): I did a rebuild from scratch and this time the step 7/15 worked fine. I received some warnings for `puppeteer` though, just FYI: ``` ... > puppeteer@1.11.0 install /node_modules/puppeteer > node install.js Chromium downloaded to /node_modules/puppeteer/.local-chromium/linux-609904 npm WARN saveError ENOENT: no such file or directory, open '/package.json' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open '/package.json' npm WARN !invalid#1 No description npm WARN !invalid#1 No repository field. npm WARN !invalid#1 No README data npm WARN !invalid#1 No license field. + puppeteer@1.11.0 added 43 packages from 22 contributors and audited 50 packages in 128.675s found 0 vulnerabilities ... ``` Also at the end things did go wrong: ``` Step 15/15 : CMD /bin/archive ---> Running in 0d553c4b34f6 ---> a72cafb54257 Removing intermediate container 0d553c4b34f6 Successfully built a72cafb54257 Successfully tagged archiveboxmaster_archivebox:latest WARNING: Image for service archivebox was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`. Creating archiveboxmaster_nginx_1 ... Creating archiveboxmaster_archivebox_1 ... Creating archiveboxmaster_nginx_1 Creating archiveboxmaster_nginx_1 ... error Creating archiveboxmaster_archivebox_1 ... error ERROR: for archiveboxmaster_archivebox_1 Cannot start service archivebox: Bind mount failed: '/volume1/docker/ArchiveBox/ArchiveBox-master/data' does not exists ERROR: for nginx Cannot start service nginx: Bind mount failed: '/volume1/docker/ArchiveBox/ArchiveBox-master/data' does not exists ERROR: for archivebox Cannot start service archivebox: Bind mount failed: '/volume1/docker/ArchiveBox/ArchiveBox-master/data' does not exists ERROR: Encountered errors while bringing up the project. ```
Author
Owner

@mawmawmawm commented on GitHub (Jan 25, 2019):

Actually... creating that data directory with chmod 777 solved the issue and both containers are booting up now.
I see the web server running on port 8098 with a blank index file (no content, just an empty dir listing):

<head><title>Index of /</title></head>
<body>
<h1>Index of /</h1><hr><pre><a href="../">../</a>
</pre><hr></body>
</html>

However when I try to add an example URL through (as root)
echo "https://example.com" | docker-compose exec -T archivebox /bin/archive

just nothing happens. No input file is being added, no URL is being crawled. Any idea what's (not) going on there?

docker-compose exec archivebox /bin/archive https://example.com/some/feed.rss

works however and the script errors out because of the 404 (expected):

[!] Failed to download https://example.com/some/feed.rss

     HTTP Error 404: Not Found

Adding my pinboard feed seems to work and the corresponding txt / json files are being created:

[*] [2019-01-25 07:06:38] Downloading http://feeds.pinboard.in/rss/secret:[redacted]/u:martin.weber/ > /data/sources/feeds.pinboard.in-1548399998.txt
[+] [2019-01-25 07:08:46] Adding 242 new links from /data/sources/feeds.pinboard.in-1548399998.txt to /data/index.json

Links are being crawled / files being pulled now, screenshots and PDFs etc being generated... It works! (Just the simple URL add through the command line apparently doesn't. No big deal. ). Thanks again!

<!-- gh-comment-id:457477281 --> @mawmawmawm commented on GitHub (Jan 25, 2019): Actually... creating that `data` directory with `chmod 777` solved the issue and both containers are booting up now. I see the web server running on port 8098 with a blank index file (no content, just an empty dir listing): ```<html> <head><title>Index of /</title></head> <body> <h1>Index of /</h1><hr><pre><a href="../">../</a> </pre><hr></body> </html> ``` However when I try to add an example URL through (as root) ```echo "https://example.com" | docker-compose exec -T archivebox /bin/archive``` just nothing happens. No input file is being added, no URL is being crawled. Any idea what's (not) going on there? ```docker-compose exec archivebox /bin/archive https://example.com/some/feed.rss``` works however and the script errors out because of the 404 (expected): ```[*] [2019-01-25 07:04:40] Downloading https://example.com/some/feed.rss > /data/sources/example.com-1548399880.txt [!] Failed to download https://example.com/some/feed.rss HTTP Error 404: Not Found ``` Adding my pinboard feed seems to work and the corresponding txt / json files are being created: ```docker-compose exec archivebox /bin/archive http://feeds.pinboard.in/rss/secret:[redacted]/u:martin.weber/ [*] [2019-01-25 07:06:38] Downloading http://feeds.pinboard.in/rss/secret:[redacted]/u:martin.weber/ > /data/sources/feeds.pinboard.in-1548399998.txt [+] [2019-01-25 07:08:46] Adding 242 new links from /data/sources/feeds.pinboard.in-1548399998.txt to /data/index.json ``` Links are being crawled / files being pulled now, screenshots and PDFs etc being generated... It works! (Just the simple URL add through the command line apparently doesn't. No big deal. ). Thanks again!
Author
Owner

@pirate commented on GitHub (Jan 25, 2019):

Glad to hear you got it working!

I'll add a note to the docs about creating that data/ folder beforehand, and I'll see if I can fix the ability to add a single url via stdin.

<!-- gh-comment-id:457728901 --> @pirate commented on GitHub (Jan 25, 2019): Glad to hear you got it working! I'll add a note to the docs about creating that `data/` folder beforehand, and I'll see if I can fix the ability to add a single url via stdin.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#1600
No description provided.