I was following the this article https://devcenter.heroku.com/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.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
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.
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.
I needed to explicitly pass the app name and not the internal one so doing heroku container:push --app rocky-wildwood-86034
went well.
I did: heroku container:push --app mediabox
the proper one was: heroku container:push --app rocky-wildwood-86034
Simple the app name should be the global heroku app name instead of the one which was defined in docker-compose.yml.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With