0
votes

I have generated an app with JHipster 5.0.1 version. The app has 4 components:

  • UAA app for user accounting and authorizing
  • JHipster Registry app
  • A gateway app
  • A simple microservice

I have followed all the steps in the documentation, including the steps to create docker compose file. But, then when I want to run docker-compose up I get some errors with pull permisions with my custom components.

Here are the logs

compose.cli.verbose_proxy.proxy_callable: docker inspect_image <- ('chipagames') urllib3.connectionpool._make_request: http://localhost:None "GET /v1.22/images/chipagames/json HTTP/1.1" 404 60 compose.service.pull: Pulling chipagames-app (chipagames:)... compose.cli.verbose_proxy.proxy_callable: docker pull <- ('chipagames', tag='latest', stream=True, platform=None) docker.auth.get_config_header: Looking for auth config docker.auth.resolve_authconfig: Using credentials store "osxkeychain" docker.auth._resolve_authconfig_credstore: Looking for auth entry for 'https://index.docker.io/v1/' docker.auth.get_config_header: Found auth config urllib3.connectionpool._make_request: http://localhost:None "POST /v1.22/images/create?tag=latest&fromImage=chipagames HTTP/1.1" 404 91

I have docker service running, I have created a repository in docker hub too, but I don't understand the error.

EDIT:

Here is my docker-compose.yml

version: '2'
services:
    appuaa-app:
        image: appuaa
        environment:
            - SPRING_PROFILES_ACTIVE=prod,swagger
            - EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka
            - SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config
            - SPRING_DATA_MONGODB_URI=mongodb://appuaa-mongodb:27017
            - SPRING_DATA_MONGODB_DATABASE=appuaa
            - JHIPSTER_SLEEP=30
            - SPRING_DATA_ELASTICSEARCH_CLUSTER_NODES=appuaa-elasticsearch:9300
            - JHIPSTER_REGISTRY_PASSWORD=;nddeanb
    appuaa-mongodb:
        image: mongo:3.6.3
    appuaa-elasticsearch:
        image: elasticsearch:5.6.5
        command: -Enetwork.host=0.0.0.0 -Ediscovery.type=single-node

    chipagames-app:
        image: chipagames
        environment:
            - SPRING_PROFILES_ACTIVE=prod,swagger
            - EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka
            - SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config
            - SPRING_DATASOURCE_URL=jdbc:postgresql://chipagames-postgresql:5432/chipagames
            - JHIPSTER_SLEEP=30
            - JHIPSTER_REGISTRY_PASSWORD=;nddeanb
        ports:
            - 8080:8080
    chipagames-postgresql:
        image: postgres:9.6.5
        environment:
            - POSTGRES_USER=chipagames
            - POSTGRES_PASSWORD=

    users-app:
        image: users
        environment:
            - SPRING_PROFILES_ACTIVE=prod,swagger
            - EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/eureka
            - SPRING_CLOUD_CONFIG_URI=http://admin:$${jhipster.registry.password}@jhipster-registry:8761/config
            - SPRING_DATASOURCE_URL=jdbc:postgresql://users-postgresql:5432/users
            - JHIPSTER_SLEEP=30
            - SPRING_DATA_ELASTICSEARCH_CLUSTER_NODES=users-elasticsearch:9300
            - JHIPSTER_REGISTRY_PASSWORD=;nddeanb
    users-postgresql:
        image: postgres:10.4
        environment:
            - POSTGRES_USER=users
            - POSTGRES_PASSWORD=
    users-elasticsearch:
        image: elasticsearch:5.6.5
        command: -Enetwork.host=0.0.0.0 -Ediscovery.type=single-node

    jhipster-registry:
        extends:
            file: jhipster-registry.yml
            service: jhipster-registry

    jhipster-elasticsearch:
        extends:
            file: jhipster-console.yml
            service: jhipster-elasticsearch
    jhipster-logstash:
        extends:
            file: jhipster-console.yml
            service: jhipster-logstash
        depends_on:
            - jhipster-elasticsearch
    jhipster-console:
        extends:
            file: jhipster-console.yml
            service: jhipster-console
        depends_on:
            - jhipster-elasticsearch
    jhipster-import-dashboards:
        extends:
            file: jhipster-console.yml
            service: jhipster-import-dashboards
        depends_on:
            - jhipster-elasticsearch
    jhipster-zipkin:
        extends:
            file: jhipster-console.yml
            service: jhipster-zipkin
        depends_on:
            - jhipster-elasticsearch
2
You should post your docker-compose or some additional information such as entrypoint command, some configuration, env, dockerfiles...Alejandro Galera
I have added my docker-componse.yml fileFernando Vaquero Merediz
It looks like command: in several services have only parameters but not binary.Alejandro Galera
But the error says ERROR: compose.cli.errors.log_api_error: pull access denied for appuaa, repository does not exist or may require 'docker login'Fernando Vaquero Merediz

2 Answers

1
votes

You have the private repository I guess. If it is Private repository then pull requires the docker login credentials. Follow this link: https://ropenscilabs.github.io/r-docker-tutorial/04-Dockerhub.html

With this you are able to pull the Docker Image.

0
votes

The problem is that docker is looking for your images appuaa, chipagames. That comes because of you haven't build them locally and docker is looking at the known repositories like hub.docker for it, without success.

You should build your applications either with

./mvnw -Pprod package dockerfile:build

or

./gradlew -Pprod build buildDocker

and then try to docker-compose up again