amanral/elk-fox
Aim: Add firefox inside the ELK container image from sebp (https://hub.docker.com/r/sebp/elk/) so we can start the container without doing port mappings and run firefox from within the container. Note - This was more of an experiment in running GUI apps from inside the container. In reality, the kibana and other services can be accessed from a browser started outside the container (from host using the exposed ports, for example localhost:5601 for kibana
Usage: a. For running the image: docker run -it -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME/.Xauthority:/home/amanral/.Xauthority --net=host amanral/elk-fox:rev1 /bin/bash
Note - We are overriding the CMD in the Dockerfile with /bn/bash because for firefox we needed to create a user profile and login with that user when the container starts but the ELK services require root access
b. For running the ELK services, need the root access so can use sudo: sudo service elasticsearch start; sudo service logstash start; sudo service kibana start
c. Run firefox directly from inside container: firefox& Note - You will see some error messages like 'Gtk-Message: Failed to load module "canberra-gtk-module" ' but these can be ignored
FROM sebp/elk
RUN apt-get -y update && apt-get install --fix-missing -y firefox && apt-get install --fix-missing -y sudo
#Replace below details with user / group id you would like to use
RUN export uid=1000 gid=1000 &&
mkdir -p /home/amanral &&
mkdir -p /etc/sudoers.d/ &&
echo "amanral:x:${uid}:${gid}:amanral,,,:/home/amanral:/bin/bash" >> /etc/passwd &&
echo "amanral:x:${uid}:" >> /etc/group &&
echo "amanral ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/amanral &&
chmod 0440 /etc/sudoers.d/amanral &&
chown ${uid}:${gid} -R /home/amanral
USER amanral ENV HOME /home/amanral
#ENTRYPOINT [ "/bin/bash " ] CMD [ "/usr/local/bin/start.sh" ]
docker pull amanral/elk-fox