-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpvault.Dockerfile
More file actions
28 lines (22 loc) · 1.17 KB
/
pvault.Dockerfile
File metadata and controls
28 lines (22 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM jbparfum/perfumersvault:latest
# Switch to root to ensure we can write to /var/www/html
USER root
# Copy custom updated files directly into the image
# Paths are relative to project root (../)
COPY pages/listIngredients.php /var/www/html/pages/listIngredients.php
COPY js/autosearch.js /var/www/html/js/autosearch.js
COPY api-functions/ingredient_autosearch.php /var/www/html/api-functions/ingredient_autosearch.php
# FORCE Fix to allow running FPM as root (since www-data is broken/missing)
RUN echo "[www]" > /etc/php-fpm.d/z-force-user.conf && \
echo "user = root" >> /etc/php-fpm.d/z-force-user.conf && \
echo "group = root" >> /etc/php-fpm.d/z-force-user.conf
# IMPORTANT: We must OVERRIDE the entrypoint to pass the -R flag to php-fpm
# Looking at original image, entrypoint.sh likely executes php-fpm at the end.
# We will create a wrapper entrypoint
COPY docker-compose/entrypoint_wrapper.sh /entrypoint_wrapper.sh
RUN chmod +x /entrypoint_wrapper.sh
ENTRYPOINT ["/entrypoint_wrapper.sh"]
# Ensure files are readable
RUN chmod 644 /var/www/html/pages/listIngredients.php \
/var/www/html/js/autosearch.js \
/var/www/html/api-functions/ingredient_autosearch.php