Inspecting a remote Phoenix Docker container with :observer

I have a Phoenix application running in a Docker container, based on the bitwalker/alpine-elixir-phoenix image.

I would like to be able to inspect it with :observer.start as described in chapter 12 of Programming Phoenix.

I assume several steps are needed :

  • inspecting the remote host from my local machine, simply via ssh (there is a related discussion here)
  • run iex> :observer.start() inside the container (I have added RUN apk add --update postgresql-client erlang-observer && rm -rf /var/cache/apk/* in my Dockerfile
    When doing this, I get the following error :
** (UndefinedFunctionError) function :wx_object.start/3 is undefined (module :wx_object is not available)
   :wx_object.start(:observer_wx, [], [])
   observer_wx.erl:72: :observer_wx.start/0

My understanding is that wx_object is part of the UI of :observer.
Assuming this would be fixed by installing another package, is it really the way to go? Is there a resource I could open to outside (a port ?) that would let me grab the output of :observer and render it on my local machine?

Or maybe another idea to explore would be to use ttb and funnel the raw data (how ?) to :observer on my local machine?

1 Like

Maybe this project can help you on your way:


I had a problem also using the observer with erlang/elixir in a docker container.