Romain 95de9514c0 HUE-8834 [docker] Refactor the ini to simplify the configurations 7 роки тому
..
conf 95de9514c0 HUE-8834 [docker] Refactor the ini to simplify the configurations 7 роки тому
Dockerfile e7c7c55624 HUE-8687 [docker] Temp fix until npm-install can use PREFIX 7 роки тому
README.md 95de9514c0 HUE-8834 [docker] Refactor the ini to simplify the configurations 7 роки тому
docker-compose.yml 29008bf1eb HUE-8834 [docker] Persist database volumne 7 роки тому
init.sql 2b37413fc0 HUE-8834 [docker] Docker compose update to boot natively with MySql 7 роки тому
startup.sh 89589f7710 HUE-8730 [docker] Refactor and organize the image building 7 роки тому

README.md

Hue Server

Get the docker image

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

Pull the image from 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:4.4.0
docker push docker-registry.gethue.com/gethue/hue:4.4.0

Run the image

Docker

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 tools/docker/hue/conf/hue-overrides.ini on top of desktop/conf/hue.ini which assumes localhost for all the data services and uses and embedded sqlite database that will error out.

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 be useful, configure Hue at runtime to point to external services. The simplified ini hue-overrides.ini can be edited before starting Hue via:

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

Note

If for example the database is pointing to your localhost, if using Docker on Linux just add the --network="host" parameter and the container will correctly point to it.

sudo docker run -it -p 8888:8888 -v $PWD/desktop/conf/pseudo-distributed.ini:/usr/share/hue/desktop/conf/z-hue.ini --network="host" gethue/hue

Docker Compose

This will start a Hue server as well as a MySQL database by default. Only the MySQL interpreter is configured in tools/docker/hue/conf/hue-overrides.ini.

Assuming we have a local hue.ini as shown in the previous section:

cd tools/docker/hue
cp conf/hue-overrides.ini hue.ini

Then:

docker-compose up -d

And to stop:

docker-compose down

Note If http://127.0.0.1:8888 does not work, get the IP of the docker container with:

sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                            NAMES
4064b02b42c9        gethue/hue          "./startup.sh"      About a minute ago   Up About a minute   0.0.0.0:8888->8888/tcp   awesome_wiles
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 4064b02b42c9
172.17.0.2

So in our case http://172.17.0.2:8888.