gpt4 book ai didi

docker - 带有Docker的Splash服务器未在Mac上运行

转载 作者:行者123 更新时间:2023-12-02 19:35:45 26 4
gpt4 key购买 nike

我正在尝试使用Docker配置Splash服务器,以使javascript显得不抓人。

我下载并安装了Docker Toolbox(由于缺少CPU MMU支持,最新版本的Docker未安装在Macbook pro 2009上)。

我在Docker Quickstart Terminal中运行了“docker run -p 5023:5023 -p 8050:8050 -p 8051:8051 scrapinghub / splash”。该命令执行,但是在“启动工厂...”之后,我无法返回我的shell提示。

我试图在浏览器中访问http://localhost:8050/并ping localhost:8050,但这不起作用:“无法访问此站点”。我将不胜感激,以帮助您了解问题所在。谢谢!

                        ##         .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/


docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com

Ordinateur:~ jb$ docker run -p 5023:5023 -p 8050:8050 -p 8051:8051 scrapinghub/splash
Unable to find image 'scrapinghub/splash:latest' locally
latest: Pulling from scrapinghub/splash
75c416ea735c: Pull complete
c6ff40b6d658: Pull complete
a7050fc1f338: Pull complete
f0ffb5cf6ba9: Pull complete
be232718519c: Pull complete
de1c9f88de34: Pull complete
0b8cdf21020f: Pull complete
cf35f91dcdb5: Pull complete
bfbc20b51f2f: Pull complete
f434ae0e9eb2: Pull complete
Digest: sha256:0a91eb2de229289b0c83f39d8bd079d2464a954001869417a5297aa60820af5b
Status: Downloaded newer image for scrapinghub/splash:latest
2017-07-26 10:45:59+0000 [-] Log opened.
2017-07-26 10:45:59.513146 [-] Splash version: 3.0
2017-07-26 10:45:59.515698 [-] Qt 5.9.1, PyQt 5.9, WebKit 602.1, sip 4.19.3, Twisted 16.1.1, Lua 5.2
2017-07-26 10:45:59.516027 [-] Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609]
2017-07-26 10:45:59.516214 [-] Open files limit: 1048576
2017-07-26 10:45:59.516349 [-] Can't bump open files limit
2017-07-26 10:45:59.657299 [-] Xvfb is started: ['Xvfb', ':806019943', '-screen', '0', '1024x768x24', '-nolisten', 'tcp']
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
2017-07-26 10:45:59.992921 [-] proxy profiles support is enabled, proxy profiles path: /etc/splash/proxy-profiles
2017-07-26 10:46:00.273110 [-] verbosity=1
2017-07-26 10:46:00.273490 [-] slots=50
2017-07-26 10:46:00.275082 [-] argument_cache_max_entries=500
2017-07-26 10:46:00.276541 [-] Web UI: enabled, Lua: enabled (sandbox: enabled)
2017-07-26 10:46:00.278098 [-] Site starting on 8050
2017-07-26 10:46:00.278647 [-] Starting factory <twisted.web.server.Site object at 0x7f751d78ccf8>

如果我重新启动docker并运行“docker ps”,则可以看到该容器正在运行:
Ordinateur:~ jb$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e2c23b576b88 scrapinghub/splash "python3 /app/bin/..." 2 hours ago Up 2 hours 0.0.0.0:5023->5023/tcp, 0.0.0.0:8050-8051->8050-8051/tcp gallant_feynman

最佳答案

Docker可以在本地主机以外的地址使用。从您的日志中:

docker is configured to use the default machine with IP 192.168.99.100



尝试访问 http://192.168.99.100:8050而不是localhost。如果您使用的是docker-machine,还可以使用 docker-machine ip default命令获取一个IP地址。

关于docker - 带有Docker的Splash服务器未在Mac上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45327400/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com