Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile: minimize docker image by using nginx (alpine) #362

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cuongtransc
Copy link

Dockerize elasticsearch-head and serve by nginx.

  1. Support HTTP Basic Authentication, default parameters:
  • USERNAME=elasticsearch
  • PASSWORD=elasticsearch@123
  1. Connect ElasticSearch Server, don't need to enable http.cors.allow-origin on elasticsearch.
    Default parameters:
  • ES_HOST=172.17.0.1
  • ES_PORT=9200

Build:

docker build -t cuongtransc/elasticsearch-hq:5.0 .

Run:

docker run \
    --name esh \
    -p 8080:80 \
    -e HOST=es.example.com \
    -e PASSWORD=elasticsearch@123 \
    -e ES_HOST=172.17.0.1 \
    -e ES_PORT=9200 \
    cuongtransc/elasticsearch-head:5-alpine

Access: http://es.example.com:8080/index.html?http://es.example.com:8080/

The Docker Image size is 17.2 MB! (Compressed Size is 7 MB).

Docker Image: https://hub.docker.com/r/cuongtransc/elasticsearch-head/tags/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant