Microgateway is not starting in docker

Hi,

I have created a couple fo microgateways and I am now in the process to experiment on how to create a docker image of a microgateway.

I followed the following article:

https://apigee.com/about/blog/api-technology/running-apigee-edge-microgateway-docker-container and all the steps is work as suggested.

After I have executed the “docker run --env-file ./--env.list -p 8000:8000 -v :/root/.edgemicro -d -t ndietz/emgw” command I get a long key back. So I assume the container was built successfully.

When I execute the CURL command to the the docker IP then I get the following response:

curl: (7) Failed connect to 172.17.0.1:8000; Connection refused

I then checked with netstat and there is nothing running on port 8000 and checked in docker with “docker ps -a”, the container was built: however there is no port listed to the container. But the “npm start” command is present.

Please advise on how do I troubleshoot this? To start the edgemicro gateway with the key and secret is working perfectly.

@Etienne Dippenaar

That is a very old article. Please refer to the steps here: https://github.com/apigee-internal/microgateway/tree/master/kubernetes/docker/edgemicro

If you want to run Microgateway on Kubernetes, please see this:

https://github.com/apigee-internal/microgateway/tree/master/kubernetes

1 Like

Hi @srinandans

Thank you for the information. I have followed the steps listed in the kubernetes instructions. With the following step I assume it should be: helloword-service and not hellworld-service

When execute the following command I get the “helloword” service listed in the list, Is this correct?

The following steps has a missing H after the -

But thank you for good guidelines, I finally got it working. I have tried the Docker one as well but when I execute step3 I am getting the following issue:

docker: invalid reference format: repository name must be lowercase.

Thank you @Etienne Dippenaar. Can you please give me the locations to the typo?

For step 3, can you please paste the exact command here?

Hi,

I have added the locations into my original reply but I see it didn’t pull through, sorry about that

When you deploy an application in Edgemicro as a Service:

kubectl apply -f samples/helloworld/hellworld-service.yaml

When you call an API in the verification steps for Edgemicro as a Service:

curl - 'x-api-key:your-edge-api-key' $GATEWAY_IP:80/hello/echo;echo

Docker Command: After I have rerun the same command as yesterday it is now working, not sure why that will happen but the docker is now built, thanks for the great article.

Hi @srinandans

In your article you say the Openshift part is coming soon. Have you done anything wrt deploying this gateway in Openshift?

We would have to defer that work. I don’t have easy access to openshift.