title: Hue in Docker author: admin type: post date: 2019-03-12T04:26:43+00:00 url: /hue-in-docker/ ampforwp-amp-on-off:
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.
Just pull the latest from the Internet or build it yourself from the Hue repository.
Pull the image from Hue's Docker Hub:
{{< highlight bash >}}
sudo docker pull gethue/hue:latest{{< /highlight >}}
Directly from Github source:
{{< highlight bash >}}sudo docker build https://github.com/cloudera/hue.git#master -t hue -f tools/docker/hue/Dockerfile{{< /highlight >}}
Or from a cloned local Hue:
{{< highlight bash >}}sudo docker build . -t hue -f tools/docker/hue/Dockerfile{{< /highlight >}}
Note
{{< highlight bash >}}docker build . -t docker-registry.gethue.com/gethue/hue:v4.4
docker push docker-registry.gethue.com/gethue/hue:v4.4{{< /highlight >}}
{{< highlight bash >}}docker run -it -p 8888:8888 gethue/hue:latest{{< /highlight >}}
Hue should then be up and running on your default Docker IP on the port 8888, so usually http://127.0.0.1:8888.
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).
{{< highlight bash >}}docker run -it -p 8888:8888 -v $PWD/tools/docker/hue/hue.ini:/usr/share/hue/desktop/conf/z-hue.ini gethue/hue{{< /highlight >}}
and for advanced properties copy the full configuration ini:
{{< highlight bash >}}cp /desktop/conf.dist/hue.ini .{{< /highlight >}}
{{< highlight bash >}}docker run -it -p 8888:8888 -v $PWD/hue.ini:/usr/share/hue/desktop/conf/z-hue.ini gethue/hue{{< /highlight >}}
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!