我正在尝试使用以下方法连接到我的 IAM 服务器:
curl -i -X POST -H "Content-type: application/json" http://localhost:9089/account/list -d '{"jwt": "jwt_token..."}'
这样做时,我收到如下错误:
curl: (7) 无法连接到本地主机端口 9089:连接被拒绝
任何建议将不胜感激!
编辑:
> npm info it worked if it ends with ok npm info using npm@5.3.0 npm
> info using node@v8.5.0 npm info lifecycle iam@1.0.2~prestart:
> iam@1.0.2 npm info lifecycle iam@1.0.2~start: iam@1.0.2
>
> > iam@1.0.2 start /usr/src/app
> > node server.js
>
> HTTP listening on port 9089 HTTPS listening on port 9449
Run Code Online (Sandbox Code Playgroud)
root@Ubuntu1604-001:/home/src/IAM# docker images
REPOSITORY TAG IMAGE ID …Run Code Online (Sandbox Code Playgroud) (在 Ubuntu 16.04 和 Docker 1.13 上)
当我运行试图运行我的 server.js 的 dockerfile 时,出现错误:
sh:1:节点:未找到
我做了一些研究,名称 node 和 nodejs 由于包冲突而改变并导致错误;但是,当我切换到 nodejs-legacy 时不起作用。是什么导致了这个问题?
文件
FROM ubuntu
RUN apt-get update
RUN apt-get install nodejs -y
#RUN rm -f package-lock.json
RUN apt-get install npm -y
RUN apt-get install apt-utils -y
WORKDIR /usr/scr/app
COPY package.json package-lock.json /usr/src/app/
COPY . .
EXPOSE 8080
CMD ["npm", "start"]
Run Code Online (Sandbox Code Playgroud)
包.json
{
"name": "iam",
"version": "1.0.2",
"description": "Identity and access management.",
"main": "server.js",
"scripts": {"start": "node server.js" …Run Code Online (Sandbox Code Playgroud) 我试图找到一个名为的文件mynet1,但无法在我的src文件夹中找到它,并想在系统中搜索所有可能的文件。给定filename可能在我/root及以后的任何位置的文件,Ubuntu命令是什么来查找文件?