加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – Heroku docker部署

发布时间:2020-12-17 03:18:55 所属栏目:百科 来源:网络整理
导读:我遵循了这篇文章 https://devcenter.heroku.com/articles/container-registry-and-runtime,并且我坚持使用“heroku container:push”.我运行“heroku容器:push –app mediabox”并正确构建docker镜像,然后开始将其推送到注册表,这就是我得到的: Successf
我遵循了这篇文章 https://devcenter.heroku.com/articles/container-registry-and-runtime,并且我坚持使用“heroku container:push”.我运行“heroku容器:push –app mediabox”并正确构建docker镜像,然后开始将其推送到注册表,这就是我得到的:

Successfully built 7926b98d51b5
The push refers to a repository [registry.heroku.com/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:

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"]

我在这里找不到解决方案.谢谢你的帮助.

解决方法

当我忘记运行heroku容器时遇到了这个问题:登录.即使您已登录到heroku,heroku容器服务也需要单独登录.这就是为什么你在上传开始时收到错误的原因 – 你没有被授权.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读