Heroku:找不到Docker入口点 [英] Heroku: docker entrypoint not found

查看:71
本文介绍了Heroku:找不到Docker入口点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Heroku上部署一个项目。我已经设置了bash入口点应用程序,该应用程序位于应用程序的根目录中。 Dockerfile内容:

I am trying to deploy a project on Heroku. I have set up bash entrypoint application, which is located in application root directory. Dockerfile content:

FROM node:10

# Create app directory
WORKDIR /usr/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

RUN npm install
# If you are building your code for production
# RUN npm ci --only=production

# Bundle app source
COPY . .

RUN entrypoint.sh

当heroku尝试部署时,失败在此行中调用入口点:

When heroku tries to deploy, it fails when calling entrypoint in this line:

RUN entrypoint.sh

它表示未找到entrypoint.sh,尽管它位于项目目录中并且已添加到容器中。请参见项目结构此处

It says that entrypoint.sh is not found - although it is located in project directory and it is added to container. See project structure here.

推荐答案

您使用的是 RUN 而不是 ENTRYPOINT


  • RUN 的意思是在构建过程中运行此命令。

  • ENTRYPOINT 的意思是将此命令设置为当您执行 docker run 时发生的情况。

  • RUN means "run this command as part of build".
  • ENTRYPOINT means "set this command as what happens when you do docker run."

这篇关于Heroku:找不到Docker入口点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆