|
FROM nikolaik/python-nodejs:python3.10-nodejs18 |
|
|
|
|
|
USER root |
|
|
|
RUN apt-get -y update && \ |
|
apt-get install -y nginx libglu1 xvfb libxcursor1 ca-certificates && \ |
|
apt-get clean && \ |
|
update-ca-certificates |
|
|
|
|
|
RUN mkdir -p /var/cache/nginx \ |
|
/var/log/nginx \ |
|
/var/lib/nginx \ |
|
/var/run/nginx.pid \ |
|
/home/pn/app/build |
|
|
|
RUN chown -R pn:pn /var/cache/nginx \ |
|
/var/log/nginx \ |
|
/var/lib/nginx \ |
|
/var/run/nginx.pid \ |
|
/home/pn/app/build |
|
|
|
|
|
USER pn |
|
ENV HOME=/home/pn \ |
|
PATH=/home/pn/.local/bin:$PATH |
|
|
|
|
|
WORKDIR /home/pn/app |
|
|
|
|
|
COPY --chown=pn requirements.txt requirements.txt |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
COPY --chown=pn nginx.conf /etc/nginx/sites-available/default |
|
|
|
|
|
COPY --chown=pn build/ /home/pn/app/build/ |
|
|
|
|
|
COPY --chown=pn run.sh /home/pn/app/ |
|
|
|
|
|
RUN chmod +x /home/pn/app/build/linuxBuild.x86_64 |
|
|
|
|
|
CMD ["bash", "run.sh"] |
|
|