UsamaAshraf / microservices-using-rabbitmq

Python & Go microservices on Docker, using RabbitMQ for asynchronous IPC
MIT License
58 stars 38 forks source link

Unable to run docker-compose up #1

Open NimzyMaina opened 5 years ago

NimzyMaina commented 5 years ago

When building the image I get the following error. Kindly assist.

Reading package lists...
+ + grep -q Package: erlang-base-hipe
apt-cache show erlang-base-hipe
+ apt-get install -y --no-install-recommends erlang-base-hipe
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 erlang-base-hipe : Depends: libtinfo6 (>= 6) but it is not installable
E: Unable to correct problems, you have held broken packages.
ERROR: Service 'rabbitmq-server' failed to build: The command '/bin/sh -c set -eux;     apt-get update;  if apt-cache show erlang-base-hipe 2>/dev/null | grep -q 'Package: erlang-base-hipe'; then             apt-get install -y --no-install-recommends                      erlang-base-hipe                ;       fi;     apt-get install -y --no-install-recommends              erlang-asn1             erlang-crypto           erlang-eldap            erlang-inets            erlang-mnesia           erlang-nox              erlang-os-mon           erlang-public-key               erlang-ssl
erlang-xmerl    ;       rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

Kind regards

masonlr commented 5 years ago

@NimzyMaina the detail of the RabbitMQ Dockerfile is not so important for the tutorial. As a workaround, you could modify the docker-compose.yml file to pull rabbitmq:latest directly from Docker Hub, i.e.:

version: "3.2"
services:
    rabbitmq-server:
        image: rabbitmq:latest

    python-service:
        build: ./python-service
        # 'rabbitmq-server' will be available as a network reference inside this service 
        # and this service will start only after the RabbitMQ service has.
        depends_on:
            - rabbitmq-server
        # Keep it running.  
        tty: true
        # Map port 3000 on the host machine to port 3000 of the container.
        ports:
            - "3000:3000"
        volumes:
            - './python-service:/python-service'

    go-service:
        build: ./go-service
        depends_on:
            - rabbitmq-server
        tty: true
        volumes:
            - './go-service:/go-service'

# Host volumes used to store code.
volumes:
    python-service:
    go-service:
fornof commented 5 years ago

I had issues with gpg key failing : gpg: keyserver receive failed: Cannot assign requested address The solution that looks like it works is here: https://github.com/tianon/gosu/issues/35 I just did host ha.pool.sks-keyservers.net and pulled an ip address there to replace.

I also had issues with it saying the mount failed and that it was not recognized by docker. This solved the issue: https://github.com/localstack/localstack/issues/480