Running the Palo Server in a Docker Container

    Running the Palo Server in a Docker Container

    It occurs to me that those of you who are using a Debian based distribution might like to try the palo rpm using Docker. After the initial setup, there should be no runtime performance penalty under docker. I'm no docker expert so, I'm not sure how to share the container, so I'm going to just share the steps to build and run the container.

    I've inserted the contents of a file called Dockerfile below. You'll need to copy and paste this text into a file called 'Dockerfile'. Create a new directory off home (~) called 'docker-palo'

    Source Code

    1. FROM fedora
    2. MAINTAINER myk <myk321@gmail.com>
    3. RUN dnf -y update && dnf clean all
    4. RUN dnf -y install boost gperftools selinux-policy
    5. RUN dnf -y install wget && dnf clean all
    6. RUN mkdir ~/palo
    7. RUN cd ~/palo
    8. RUN wget https://myk52348.fedorapeople.org/palo/5.1-4/x86_64/palo-5.1.4-0.fc23.x86_64.rpm
    9. RUN rpm -Uvh palo-5.1.4-0.fc23.x86_64.rpm
    10. EXPOSE 7777
    11. WORKDIR /data
    12. CMD [ "/usr/bin/palo", "--init-file=/etc/palo.ini", "--data-directory=/data" ]


    With your Dockerfile create in ~/docker-palo, you'll need to translate the following commands according to your distribution.
    For Fedora, Centos, RHEL, the following works for me:
    sudo dnf install docker
    sudo systemctl start docker
    cd ~/docker-palo/Dockerfile
    sudo docker build -t myk/palo .

    The 'myk' on the last line, should be replaced with your name
    Which should give a prompt like:
    >> Successfully built 385fb2f9724d

    On Debian, Ubuntu, Mint, I guess that the commands would be something like:
    sudo apt-get install docker
    sudo system docker start
    cd ~/docker-palo/Dockerfile
    sudo docker build -t myk/palo .

    The 'myk' on the last line, should be replaced with your name
    Which should give a prompt like:
    >> Successfully built 385fb2f9724d

    Now to get the container running, I need to first stop the palo server I have running by default with
    sudo systemctl stop palo

    But on debian this should be something like (don't do this if you don't have a palo server already running):
    sudo system palo stop

    and now you can start your new container with:
    sudo docker run -d --name palocont -p 7777:7777 385fb2f9724d

    At this point I can access the palo server running in the container, in my case via PalOOCA.

    To check all is ok, you can also use:
    sudo docker ps -l


    To stop the container
    sudo docker stop palocont


    To start the container:
    sudo docker start palocont


    To remove the container:
    sudo docker rm palocont


    It would be great if you get this running under Debian if you could post the exact commands you used.

    Kind regards
    Michael