Dockerfile of ndietz/emgw container

Hi,

We are using the docker image that you mentioned/provided in this article:

http://apigee.com/about/tags/docker. It works properly!

I checked in the docker hub: https://hub.docker.com/r/ndietz/emgw but I dont see the Dockerfile of the image.

Is there any place where I can get this Dockerfile? or anybody can share it?

Thanks in Advance

Regards

Solved Solved
0 8 474
1 ACCEPTED SOLUTION

Not applicable

@Ciro Santos, @Francois-Xavier KOWALSKI:

I just put together a new Dockerfile here: https://github.com/kevinswiber/apigee-edgemicro-docker

You can either use it as a base and bake-in your custom plugins directory or you can mount a volume that contains your custom plugins. It's up to you. This isn't actually published on Docker Hub yet, but I'm working on it. In the meantime, feel free to ask questions either here or on the GitHub issues for that repository.

Thanks!

Regards,

Kevin

View solution in original post

8 REPLIES 8

Not applicable

Hi @Ciro Santos! Apologies for the slow reply...

Glad this is working for you! I do have to say that the version of Edge Micro that this blog post was built on is quite out of date, so the installation/start up process of the recent versions is different. I would say that this Dockerfile is quite obsolete as a representation of setting up MGW.

The reason the image still works is because it is built with the older MGW version source baked in, so it is frozen.

Can I answer any specific questions about the Dockerfile, MGW configuration, etc. rather than share the broken spec?

Cheers!

Hello @Noah Dietz! Thanks for the answer.

We wanted to see the Dockerfile to be able to deploy custom plugins that we are developing. Do you have any sugestions on the best approach to have these plugins deployed in the docker container?

Also, when you said that the docker container is out of date, do you mean that it is using EMG 1? Are you planning to release a newer version of this container?

Thanks again

Regards

Not applicable

@Ciro Santos, that's awesome that you're making some new plugins.

What version of EMG are you using? The image was built with 2.0, but I believe the project is on 2.0.7, which is quite different in its architecture.

As far as building a new docker image with the latest of EMG, I would have to ask @kevinswiber about that. This blog post was more of a PoC for EMG with Docker than an officially supported distribution.

My suggestion to you is to use the volume mounting needed for the EMG configuration to your advantage. The EMG config file contains the plugins property, which also has a "dir" property. So....the kind of hacky work around without rebuilding the image is to put a "plugins" directory containing your custom code into the same directory containing your config. That way, when the volume is mounted, the plugins are available in the same space. However, you might also move the Apigee provided plugins into that directory in order to take advantage of them. Things have changed a lot so I might be off-base. Let me know if it works for y'all.

plugins:
    dir: ./custom-plugins
    sequence:
      - oauth
      - plugin-1
      - plugin-2

Thanks for the help @Noah Dietz

Following the Docker model, rather than mapping our own plugin code via an external module, we should define our new Docker container image by inheriting from your image as a base one & adding our own code at the right place.

What is usually considered the most efficient way to do that (and consequently a common practice on Dockerhub) is to share the Dockerfile so that we understand the EMG folder layout & configuration variables & consequently can cleanly add our own stuff into our own inherited container.

The exception I see to the above is if the Docker image was manually built (manual tweaks) before beup uploaded to Dockerhub. In that case, we can ( an have to have to reverse engineer) the installation to add out own stuff. But that seems to be sub-optimal to me.

Not applicable

@Ciro Santos, @Francois-Xavier KOWALSKI:

I just put together a new Dockerfile here: https://github.com/kevinswiber/apigee-edgemicro-docker

You can either use it as a base and bake-in your custom plugins directory or you can mount a volume that contains your custom plugins. It's up to you. This isn't actually published on Docker Hub yet, but I'm working on it. In the meantime, feel free to ask questions either here or on the GitHub issues for that repository.

Thanks!

Regards,

Kevin

Thank you @kevinswiber

Sorry for the late response!!

Thank you @kevinswiber, starting to use it.