mirror of
https://github.com/Cacti/cacti.git
synced 2026-10-23 03:27:02 +09:00
fix(docker): scope build context to docker/ so it builds standalone (#7513)
COPY docker/apache.conf and docker/entrypoint.sh only resolve when the build context is the repo root. Building directly from docker/ (docker build .) fails because those paths don't exist relative to that context. Neither COPY step needs anything outside docker/, so narrow the context instead of requiring root. Fixes #7512 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> Co-authored-by: TheWitness <thewitness@cacti.net>
This commit is contained in:
1 parent
1a17a6f176
commit
5d90e579e2
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -10,8 +10,8 @@
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile
|
||||
context: ./docker
|
||||
dockerfile: Dockerfile
|
||||
container_name: cacti_web
|
||||
ports:
|
||||
- "${WEB_PORT:-8080}:80"
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ RUN a2enmod rewrite headers proxy proxy_fcgi setenvif \
|
||||
&& a2dismod mpm_prefork \
|
||||
&& a2enmod mpm_event
|
||||
|
||||
COPY docker/apache.conf /etc/apache2/sites-available/cacti.conf
|
||||
COPY apache.conf /etc/apache2/sites-available/cacti.conf
|
||||
RUN a2dissite 000-default && a2ensite cacti
|
||||
|
||||
# Static PHP settings (runtime-tunable values are set in entrypoint.sh)
|
||||
@@ -72,7 +72,7 @@ RUN mkdir -p /var/www/html/cacti/cache \
|
||||
/var/www/html/cacti/log \
|
||||
&& chown -R www-data:www-data /var/www/html/cacti
|
||||
|
||||
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||
|
||||
# App code comes from the docker-compose bind mount, not from this image.
|
||||
|
||||
Reference in new issue
Block a user