我正在尝试将单个docker容器部署到弹性beanstalk和我的运行命令Local gulp not found in /app/user ... try running npm install gulp
。 Docker不断抛出错误FROM node:6.5.0
# Internally, we arbitrarily use port 3000
ENV PORT 3000
# Create some needed directories
RUN mkdir -p /app/user/
WORKDIR /app/user/
# setup path
ENV PATH /app/user/node_modules/.bin:$PATH
RUN npm install -g gulp
# Install vim
RUN apt-get update && apt-get --yes --force-yes install vim
# Setup app
ADD package.json /app/user/
RUN cd /app/user && npm install
# ADD . /app/user/
EXPOSE 3000
CMD gulp production && node server.js
。我已经尝试在我的package.json文件中列出gulp作为depdency和devDependecy,但这并没有解决问题。我也试图在我的Dockerfile中全局安装gulp。
有人能告诉我我的设置有什么问题吗?这是我的文件:
Dockerfile
{
"AWSEBDockerrunVersion": "1",
"Logging": "/var/log/pm2",
"Volumes": [
{
"HostDirectory": "/var/app/current",
"ContainerDirectory": "/app/user"
}
]
}
Dockerrun.aws.json
0: jdbc:hive2://localhost:10000/> GRANT ALL ON SERVER server1 TO ROLE admin_role;
Error: Error while compiling statement: FAILED: NullPointerException privilegeObj is null for
TOK_GRANT
TOK_PRIVILEGE_LIST
TOK_PRIVILEGE
TOK_PRIV_ALL
TOK_PRINCIPAL_NAME
TOK_ROLE
admin_role
TOK_PRIV_OBJECT
TOK_SERVER_TYPE
server1 (state=42000,code=40000)
答案 0 :(得分:1)
对于那些可能正在努力解决类似问题的人来说,这是我的Dockerfile和Dockerrun.aws.json文件,用于将节点容器部署到弹性beanstalk
<强> Dockerfile 强>
FROM node:6.5.0
# Internally, we arbitrarily use port 3000
ENV PORT 3000
# Create some needed directories
RUN mkdir -p /app/user/
WORKDIR /app/user/
# setup path
ENV PATH /app/user/node_modules/.bin:$PATH
RUN npm install -g gulp
RUN npm install gulp
# Install vim
RUN apt-get update && apt-get --yes --force-yes install vim
# Setup app
ADD package.json /app/user/
RUN cd /app/user && npm install
ADD . /app/user/
EXPOSE 3000
CMD gulp production && node server.js
<强> Dockerrun.aws.json 强>
{
"AWSEBDockerrunVersion": "1",
"Logging": "/var/log/pm2",
"Volumes": []
}