I installed xampp inside a docker using the standard xampp installer and wrote a startup script that I set as the CMD that starts xampp. My problem is that to start xampp root is required. And on heroku where I intend to host this docker, the instances are run without root access. Is there a way to avoid this problem, set the permission differently or create it in a different manner?
Hers is my Dockerfile:
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update --fix-missing && \
apt-get upgrade -y && \
apt-get -y install iputils-ping && \
apt-get -y install net-tools && \
apt-get clean
COPY xampp-linux-x64-8.1.0-0-installer.run /opt/xampp-linux-x64-8.1.0-0-installer.run
RUN chmod +x /opt/xampp-linux-x64-8.1.0-0-installer.run && \
bash -c ./opt/xampp-linux-x64-8.1.0-0-installer.run && \
sed -i.bak s'/Require local/Require all granted/g' /opt/lampp/etc/extra/httpd-xampp.conf && \
# sed -i.bak s'/Listen 80/Listen ${PORT}/g' /opt/lampp/etc/httpd.conf && \
sed -i.bak s'/display_errors=Off/display_errors=On/g' /opt/lampp/etc/php.ini && \
sed -i.bak s'/post_max_size=40M/post_max_size=100M/g' /opt/lampp/etc/php.ini
COPY startup.sh /startup.sh
RUN useradd -m xamppuser
USER xamppuser
And here is the startup.sh script:
/opt/lampp/lampp start
while :
do
sleep 2m
/opt/lampp/lampp status
done
Thanks for helping out