Heroku无法识别我的Dockerfile入口点

时间:2019-04-04 14:28:43

标签: docker heroku

我正在尝试使用gostatic部署Dockerfile以便在Heroku Web dyno上提供Angular dist文件夹。

这是我的Dockerfile:

#########################
### build environment ###
#########################

# base image
FROM node:alpine as builder

WORKDIR /app/
COPY . /app/

# generate build
RUN npm install
RUN npm run build-prod

##################
### production ###
##################

# base image
FROM pierrezemb/gostatic

# copy artifact build from the 'build environment'
COPY --from=builder /app/dist/angularweb /srv/http

ENTRYPOINT  ["/goStatic"]
CMD -port $PORT

这是我部署到的dyno的日志:


heroku[web.1]: Starting process with command `/bin/sh -c -port\ \41228`
app[web.1]: 2019/04/04 14:13:41 Listening at 0.0.0.0:8043 /...
heroku[web.1]: State changed from starting to crashed
heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
heroku[web.1]: Stopping process with SIGKILL
heroku[web.1]: Process exited with status 137

关于Heroku如何识别我的[“ ENTRYPOINT”]并使用它代替/bin/sh -c的任何想法吗?

0 个答案:

没有答案