Hue in Docker

12 March 2019 in Administration - 2 minutes read

Containers offer a modern way to isolate and run applications. This post is the first one of a series showing how to run Hue as a service. Here, we will explore how to build, run and configure a Hue server image with Docker.

For impatient people, the source is available at tools/docker.

Get the docker image

Just pull the latest from the Internet or build it yourself from the Hue repository.

Pull the image from Hue’s Docker Hub:

sudo docker pull gethue/hue:latest

Build the image

Directly from Github source:

sudo docker build https://github.com/cloudera/hue.git#master -t hue -f tools/docker/hue/Dockerfile

Or from a cloned local Hue:

sudo docker build . -t hue -f tools/docker/hue/Dockerfile

Note

  • Feel free to replace -t hue in all the commands by your own docker repository and image tag, e.g. gethue/hue:latest
  • Tag and push the image to the container registry
docker build . -t docker-registry.gethue.com/gethue/hue:v4.4

docker push docker-registry.gethue.com/gethue/hue:v4.4

Run the image

Directly boot the image:

docker run -it -p 8888:8888 gethue/hue:latest

Hue should then be up and running on your default Docker IP on the port 8888, so usually http://127.0.0.1:8888.

Configuration

By default the Hue container is using a default configuration that assumes localhost for all the data services and is backed by a SQLite database in the container (and so everything is reseted at each restart and Hue can’t interact with any service).

  • The default ini is used for configuration at the image build time (e.g. which apps to always disable or certain settings like banner customization)
  • In order to configure Hue at the image runtime and for example point to external services, use the simplified hue.ini, edit the values before pointing to it and starting via:
docker run -it -p 8888:8888 -v $PWD/tools/docker/hue/hue.ini:/usr/share/hue/desktop/conf/z-hue.ini gethue/hue

and for advanced properties copy the full configuration ini:

cp /desktop/conf.dist/hue.ini .
docker run -it -p 8888:8888 -v $PWD/hue.ini:/usr/share/hue/desktop/conf/z-hue.ini gethue/hue

 

You can read more about configuring Hue in the documentation.

 

In the next episode, we will see for running this Hue container in Kubernetes!

 

As usual feel free to send feedback to the hue-user list or @gethue or send improvements!


comments powered by Disqus

More recent stories

13 November 2019
Visually surfacing SQL information like Primary Keys, Foreign Keys, Views and Complex Types
Read More
31 October 2019
Missing some color? How to improve or add your own SQL syntax Highlighter
Read More
24 October 2019
How to create a HBase table on Kerberized Hadoop clusters
Read More