|
@@ -2,12 +2,9 @@ FROM composer:1.7 as php-build
|
|
|
RUN apk add git
|
|
|
RUN adduser -S dev
|
|
|
RUN mkdir /koel && chown dev /koel
|
|
|
+COPY --chown=dev:nogroup ./koel /koel
|
|
|
WORKDIR /koel
|
|
|
USER dev
|
|
|
-ENV KOEL_VERSION 3.7.2
|
|
|
-RUN git clone --recurse-submodules --quiet \
|
|
|
- --branch "v${KOEL_VERSION}" \
|
|
|
- https://github.com/phanan/koel .
|
|
|
RUN composer install --no-interaction
|
|
|
|
|
|
FROM node:8.12.0-alpine as js-build
|
|
@@ -29,7 +26,8 @@ RUN find / -xdev -type f -perm /u+s -exec chmod --changes u-s {} \; \
|
|
|
|
|
|
RUN apt-get update && apt-get install --yes \
|
|
|
libpq-dev \
|
|
|
- zlib1g-dev
|
|
|
+ zlib1g-dev \
|
|
|
+ netcat
|
|
|
RUN docker-php-ext-install -j$(nproc) \
|
|
|
exif \
|
|
|
pdo_pgsql \
|
|
@@ -41,7 +39,7 @@ RUN chmod o+r /etc/apache2/apache2.conf
|
|
|
EXPOSE 8080
|
|
|
|
|
|
RUN mv $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini
|
|
|
-COPY --from=js-build /koel /koel
|
|
|
+COPY --from=js-build --chown=root:www-data /koel /koel
|
|
|
WORKDIR /koel
|
|
|
RUN chown --changes --recursive www-data .env storage/
|
|
|
COPY ./run-koel.sh /
|