请问,
docker run image后,通过docker ps -l查看运行情况,结果没看到端口号(ports为空)
查看日志:
[root@xxx ~]# docker logs --since 30m some-app
> star@1.0.0 start /app
> egg-scripts start --daemon --title=egg-server-star
[egg-scripts] Starting egg application at /app
[egg-scripts] Run node /app/node_modules/egg-scripts/lib/start-cluster {"title":"egg-server-star","baseDir":"/app","framework":"/app/node_modules/egg"} --title=egg-server-star
[egg-scripts] Save log file to /root/logs
[egg-scripts] Wait Start: 1...
[egg-scripts] egg started on h防止ttp://127.0.0.1:7001
docker并没有启动起来
求助,请大侠帮忙
附上dockerfile
FROM node:latest
ENV PROJECT_DIR=/app
WORKDIR $PROJECT_DIR
COPY package.json $PROJECT_DIR
RUN npm install
COPY . $PROJECT_DIR
ENV MEDIA_DIR=/media \
NODE_ENV=production \
APP_PORT=7001
VOLUME $MEDIA_DIR
EXPOSE $APP_PORT
HEALTHCHECK CMD curl --fail http://localhost:$APP_PORT || exit 1
RUN ["chmod", "+x", "./entrypoint.sh"]
ENTRYPOINT ["./entrypoint.sh"]
CMD ["start"]
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。