Deploying Heroku Dockers

I followed this article https://devcenter.heroku.com/articles/container-registry-and-runtime and got stuck with a "container hero: push." I run "heroku container: push --app mediabox" and the docker image is created correctly, and then it starts loading it into the 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 not find a solution here. Thank you for your help.

+5
source share
7 answers

, heroku container:login. heroku, heroku . - .

+3

registry.heroku.com/mediabox/web

"mediabox" heroku , .

+1

, Docker Heroku BETA, , . . , , Heroku.

Heroku , heroku container:push . .

, :

docker build . 

Heroku, :

docker tag <image> registry.heroku.com/<app>/<process-type>
docker push registry.heroku.com/<app>/<process-type>

, Gitlab CI Heroku Docker. docker, , .

0

, , heroku container:push --app rocky-wildwood-86034 .

: : push --app mediabox

: : push --app rocky-wildwood-86034

heroku , docker-compose.yml.

0

, heroku container:login. , .

0

Heroku (https://devcenter.heroku.com/articles/container-registry-and-runtime#logging-in-to-the-registry):

  1. : , , .

--username = YOUR_USER --password = $ (heroku auth: token) registry.heroku.com

:

  1. : heroku cli docker.

: IMG_NAME

docker registry.heroku.com/APP/IMG_NAME

docker push registry.heroku.com/APP/IMG_NAME

  1. , ( ) Heroku.
0

We were faced with the fact that the service account did not have deployment permissions. I wrote a short blog post. You can find it here → https://hackerlite.xyz/heroku-docker-deployments/

0
source

Source: https://habr.com/ru/post/1661955/


All Articles