我正在使用intellij 2016.1和docker插件2.1.4。 我试图将一个简单的java容器部署到远程计算机并得到错误:
无法部署'gaia-itest图片ID: gaiaadm / gaia-integration-tests':javax.websocket.DeploymentException: 启动WebSocket连接的HTTP请求失败
这是部署日志的输出:
Deploying 'gaia-itest Image Id: gaiaadm/gaia-integration-tests'...
Creating container...
Container Id: 71afc5f10a0779639543bb7c74235f507d59e24890e66d01fe17a7f90cccc301
Starting container 'gaia-itest'
Attaching to container 'gaia-itest'...
Failed to deploy 'gaia-itest Image Id: gaiaadm/gaia-integration-tests': javax.websocket.DeploymentException: The HTTP request to initiate the WebSocket connection failed
这是我的Dockerfile:
FROM maven:3.3.3-jdk-8
# Bundle app source
COPY . /src
# Set the working directory
WORKDIR /src
LABEL test=
LABEL test.run.interval=300000
CMD ["mvn","clean","install"]
和container_settings:
{
"_comment": "gaia-itest",
"Image": "gaiaadm/gaia-integration-tests",
"ExposedPorts": {
"22/tcp": {}
},
"AttachStdin": true,
"OpenStdin": true,
"HostConfig": {
"Links":["sts:sts", "whs:whs"],
"PortBindings":{
"22/tcp": [{ "HostIp": "0.0.0.0", "HostPort": "2221" }]},
"RestartPolicy": { "Name": "on-failure", "MaximumRetryCount": 5 }
}
}
我有一个与docker机器的连接,我可以从浏览器远程访问docker API并且docker端口是打开的... 我甚至可以看到从intellij运行的容器列表,我看到我的容器,它只是部署失败。
知道可能是什么问题吗?