Skip to content

Commit

Permalink
fix: hack to get 'source' available into Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pifou25 authored Apr 10, 2024
1 parent fbbb304 commit 623c532
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Build with 3 stages, 2 targets :
# hack to get Jeedom sources available for COPY
ARG JEEDOM_VERSION=V4-stable
FROM ghcr.io/pifou25/jeedom:${JEEDOM_VERSION}-source AS source

# Build with 3 stages, 2 targets :
# light_jeedom: no daemon, only apache+php
# full_jeedom: standalone with all required daemons
# Debian version: buster / bullseye / bookworm
ARG DEBIAN=bullseye
# PHP version required for bookworm is 8 minimum
ARG PHP=7.3
FROM php:${PHP}-apache-${DEBIAN} as base
# ARG is scoped we need to repeat after each 'FROM' declaration
ARG DEBIAN
ARG PHP=7.3
# optional XDEBUG arg to add xdebug packages and configuration
Expand Down Expand Up @@ -83,7 +88,7 @@ RUN sed -ri -e "s!/var/www/html!${APACHE_DOCUMENT_ROOT}!g" /etc/apache2/sites-av
RUN sed -ri -e "s!/var/www/!${APACHE_DOCUMENT_ROOT}!g" /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf

# copy PHP sources from previous stage
COPY --from=ghcr.io/pifou25/jeedom:${JEEDOM_VERSION}-source app/ ${WEBSERVER_HOME}
COPY --from=source app/ ${WEBSERVER_HOME}

# Change uid and gid of apache to docker user uid/gid - create /tmp/jeedom
RUN usermod -u 1000 www-data \
Expand Down

0 comments on commit 623c532

Please sign in to comment.