Heroku Docker部署

编程入门 行业动态 更新时间:2024-10-28 13:24:54
本文介绍了Heroku Docker部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我一直在关注本文 devcenter.heroku/文章/容器注册和运行时,而我陷入了 heroku container:push的困境。我运行 heroku container:push --app mediabox,并正确构建了docker映像,然后开始将其推送到注册表,这就是我得到的:

I was following the this article devcenter.heroku/articles/container-registry-and-runtime and I'm stuck with "heroku container:push". I run "heroku container:push --app mediabox" and the docker image is properly build and then it start to push it to registry and this is what I get:

Successfully built 7926b98d51b5 The push refers to a repository [registry.heroku/mediabox/web] 38d48dd6de30: Preparing 969058e6ddc9: Preparing 2f454953e0e7: Preparing f67c1ecd32a1: Preparing 44fade3982ca: Preparing 0accb1c81980: Waiting e79bbdfaa0d3: Waiting 1be5d1797b73: Waiting 5c0a4f4b3a35: Waiting 011b303988d2: Waiting error parsing HTTP 400 response body: unexpected end of JSON input: "" ! Error: docker push exited with 1

这是我的Dockerfile:

This is my Dockerfile:

FROM ruby:2.3.1-alpine RUN apk --update --no-cache add build-base less libxml2-dev libxslt-dev nodejs postgresql-dev && mkdir -p /app WORKDIR /app COPY Gemfile Gemfile.lock ./ RUN gem install bundler RUN bundle COPY . ./ CMD ["script/docker-entrypoint.sh"]

我在这里找不到解决方案。谢谢您的帮助。

I can't find the solution here. Thanks for your help.

推荐答案

当我忘记运行 heroku container:login 。即使您登录到heroku,heroku容器服务也需要单独登录。这就是为什么您在上传开始时就得到错误消息的原因-您未经授权。

I had this problem when I forgot to run heroku container:login. Even if you're logged in to heroku, heroku container service requires a separate login. That's why you're getting the error right at the beginning of the upload - you are not authorised.

更多推荐

Heroku Docker部署

本文发布于:2023-10-28 02:15:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1535211.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Heroku   Docker

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!