appotry/docker-hexo

默认命令部署后无法访问

Closed this issue · 1 comments

系统版本:

Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-119-generic x86_64)

docker版本:

Docker version 25.0.5, build 5dc9bcc

启动命令:

sudo docker run -d --name=hexo \
-e HEXO_SERVER_PORT=4000 \
-e GIT_USER="test" \
-e GIT_EMAIL="test@gmail.com" \
-v /home/Disk/4Tsdd/docker/hexo/blog:/app \
-p 4000:4000 \
bloodstar/hexo

容器启动后,访问http://10.1.1.10:4000,无法访问。

容器日志:


[PM2] Spawning PM2 daemon with pm2_home=/root/.pm2

[PM2] PM2 Successfully daemonized

[PM2] Starting /hexo_run.js in fork_mode (1 instance)

[PM2] Done.

┌────┬─────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐

│ id │ name        │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │

├────┼─────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤

│ 0  │ hexo_run    │ default     │ N/A     │ fork    │ 29       │ 0s     │ 0    │ online    │ 0%       │ 39.1mb   │ root     │ disabled │

└────┴─────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

***** stop hexo server run:  pm2 stop /hexo_run.js  *****

***** start hexo server run:  pm2 start /hexo_run.js  *****

***** App directory is empty, initialising with hexo and hexo-admin *****

INFO  Cloning hexo-starter https://github.com/hexojs/hexo-starter.git

INFO  Install dependencies

warning hexo > warehouse > cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.

warning hexo-renderer-marked > jsdom > abab@2.0.6: Use your platform's native atob() and btoa() methods instead

warning hexo-renderer-marked > jsdom > domexception@4.0.0: Use your platform's native DOMException instead

warning hexo-renderer-marked > jsdom > data-urls > abab@2.0.6: Use your platform's native atob() and btoa() methods instead

warning hexo-renderer-stylus > stylus > glob@7.2.3: Glob versions prior to v9 are no longer supported

warning hexo-renderer-stylus > stylus > glob > inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.

INFO  Start blogging with Hexo!

✔ Installed 10 packages on /app

✔ All packages installed (used 108ms(network 104ms), speed 0B/s, json 0(0B), tarball 0B, manifests cache hit 0, etag hit 0 / miss 0)


✔ Linked 458 latest versions fallback to /app/node_modules/.store/node_modules

deprecate hexo-filter-github-emojis@3.0.5 › jsdom@19.0.0 › domexception@^4.0.0 Use your platform's native DOMException instead

deprecate hexo-filter-github-emojis@3.0.5 › jsdom@19.0.0 › abab@^2.0.5 Use your platform's native atob() and btoa() methods instead

deprecate hexo-filter-github-emojis@3.0.5 › jsdom@19.0.0 › w3c-hr-time@^1.0.2 Use your platform's native performance.now() and performance.timeOrigin.

deprecate hexo-admin@2.3.0 › bcrypt-nodejs@0.0.3 bcrypt-nodejs is no longer actively maintained. Please use bcrypt or bcryptjs. See https://github.com/kelektiv/node.bcrypt.js/wiki/bcrypt-vs-brypt.js to learn more about these two options

deprecate hexo-admin@2.3.0 › hexo-fs@0.1.6 › chokidar@^1.5.2 Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.

deprecate hexo-admin@2.3.0 › connect-auth@0.6.1 › connect@2.7.x connect 2.x series is deprecated

deprecate hexo-admin@2.3.0 › hexo-util@0.1.7 › highlight.js@^8.6.0 Version no longer supported. Upgrade to @latest

deprecate hexo-admin@2.3.0 › hexo-fs@0.1.6 › chokidar@1.7.0 › readdirp@2.2.1 › micromatch@3.1.10 › snapdragon@0.8.2 › source-map-resolve@^0.5.0 See https://github.com/lydell/source-map-resolve#deprecated

deprecate hexo-admin@2.3.0 › hexo-fs@0.1.6 › chokidar@1.7.0 › readdirp@2.2.1 › micromatch@3.1.10 › snapdragon@0.8.2 › source-map-resolve@0.5.3 › source-map-url@^0.4.0 See https://github.com/lydell/source-map-url#deprecated

deprecate hexo-admin@2.3.0 › hexo-fs@0.1.6 › chokidar@1.7.0 › readdirp@2.2.1 › micromatch@3.1.10 › snapdragon@0.8.2 › source-map-resolve@0.5.3 › urix@^0.1.0 Please see https://github.com/lydell/urix#deprecated

deprecate hexo-admin@2.3.0 › hexo-fs@0.1.6 › chokidar@1.7.0 › readdirp@2.2.1 › micromatch@3.1.10 › snapdragon@0.8.2 › source-map-resolve@0.5.3 › resolve-url@^0.2.1 https://github.com/lydell/resolve-url#deprecated

deprecate hexo-admin@2.3.0 › connect-auth@0.6.1 › connect@2.7.11 › formidable@1.0.14 Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau

deprecate hexo-admin@2.3.0 › browserify@11.2.0 › glob@^4.0.5 Glob versions prior to v9 are no longer supported

deprecate hexo-admin@2.3.0 › browserify@11.2.0 › glob@4.5.3 › inflight@^1.0.4 This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.

deprecate hexo-admin@2.3.0 › browserify@11.2.0 › glob@4.5.3 › minimatch@^2.0.1 Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

deprecate hexo-admin@2.3.0 › browserify@11.2.0 › url@0.10.3 › querystring@0.2.0 The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

deprecate hexo-admin@2.3.0 › less@2.7.3 › request@2.81.0 request has been deprecated, see https://github.com/request/request/issues/3142

deprecate hexo-admin@2.3.0 › less@2.7.3 › request@2.81.0 › hawk@~3.1.3 This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.

deprecate hexo-admin@2.3.0 › less@2.7.3 › request@2.81.0 › uuid@^3.0.0 Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

deprecate hexo-admin@2.3.0 › less@2.7.3 › request@2.81.0 › har-validator@~4.2.1 this library is no longer supported

deprecate hexo-admin@2.3.0 › less@2.7.3 › request@2.81.0 › hawk@3.1.3 › cryptiles@2.x.x This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).

deprecate hexo-admin@2.3.0 › less@2.7.3 › request@2.81.0 › hawk@3.1.3 › sntp@1.x.x This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.

deprecate hexo-admin@2.3.0 › less@2.7.3 › request@2.81.0 › hawk@3.1.3 › boom@2.x.x This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).

deprecate hexo-admin@2.3.0 › less@2.7.3 › request@2.81.0 › hawk@3.1.3 › hoek@2.x.x This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).

Recently updated (since 2024-08-26): 2 packages (detail see file /app/node_modules/.recently_updates.txt)

✔ Run 1 script(s) in 3s.

✔ Installed 13 packages on /app

✔ All packages installed (558 packages installed from npm registry, used 24s(network 23s), speed 925.24KB/s, json 459(2.38MB), tarball 18.48MB, manifests cache hit 0, etag hit 0 / miss 0)


dependencies:

+ hexo-generator-searchdb ^1.4.1

+ hexo-admin ^2.3.0

+ hexo-deployer-git ^4.0.0

+ hexo-generator-feed ^3.0.0

+ hexo-wordcount ^6.0.1

+ hexo-filter-github-emojis ^3.0.5

+ hexo-generator-sitemap ^3.0.1

+ hexo-admonition ^1.1.2

+ hexo-generator-index ^4.0.0

+ gulp-clean-css ^4.3.0

+ gulp-uglify ^3.0.2

+ gulp-htmlmin ^5.0.1

+ gulp-htmlclean ^2.7.22


***** App directory contains no requirements.txt file, continuing *****

***** App .ssh directory is empty, initialising ssh key and configuring known_hosts for common git repositories (github/gitlab) *****

***** Running git config, user = test, email = test@gmail.com *****

***** Copying .ssh from App directory and setting permissions *****

***** Contents of public ssh key (for deploy) - *****

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDGiI2dD3dIGx193i4Uu3JcP3QOMt82x0nP1dnpp05+PRsKEy3imw1jfvI5HGGlKAN/l0s8HePpCeHEL1zf1ZWngN2iXM2dz5IVLuP/VPxo3EflbPqFmyEpX+OChSbNpK5qvCwEeP3a6bfxx3HP8kdq1IY9cCbK9oxKM/cGcpKvyqj0rhCieE6gfl4MmrsUKaRE+S2NRjmg/NV5xp3yV5CEXaruAuNIJBE7Samn9tQxPhRJPfrlynVvti2Ys7hWWgIDk7pJWBWoU0utVNxzdqymjxjaRjTAPTloKm/yiZ9LLXByU5J1WAT4sEaz3P1ZNJO3y8hJlim0CQ4ygpQLU7JFPhYIiVPuzGL8h0qhvExLtyb08/F4NrzeUTrPDG6KmFHYvuO4G0UtAc3wGsuK+QymJCEbExkQLFK4tqbvLyVaSXHJ5AhKNZhB+r0dMM2qNOA/5t8n+Ykbo3JOmnucFIIrXm6Q/nUzXJrbgFKv9NiECpfzRUG17pQOwUgr+O3KsUM= root@c75ac9d89df5

cp userRun.sh

add User CMD here!

=====User CMD Start!=====

=====User CMD end!=====

[TAILING] Tailing last 15 lines for [hexo_run] process (change the value with --lines option)

/root/.pm2/logs/hexo-run-error.log last 15 lines:

/root/.pm2/logs/hexo-run-out.log last 15 lines:

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}

0|hexo_run | exec error: ${error}


0|hexo_run  | exec error: ${error}

0|hexo_run  | exec error: ${error}

容器内不包括hexo theme相关文件。需要自己下载hexo 主题,配置主题,然后hexo g编译主题之后,才可以看到网页

默认容器只是自动化配置hexo环境,和开启hexo web server