Set COMPOSER_HOME and define VOLUMEs

This commit is contained in:
Deon George
2023-02-04 21:31:13 +11:00
parent d7b97dfce7
commit e266319386
3 changed files with 5 additions and 3 deletions

View File

@@ -34,9 +34,9 @@ RUN apk add --no-cache libjpeg libgd libpng freetype freetype-dev zlib-dev libpn
docker-php-ext-install -j$(nproc) gd && \
apk del --no-cache zlib-dev libpng-dev jpeg-dev freetype-dev
RUN ip addr list && env
# Add composer
RUN curl -4 https://getcomposer.org/installer|php -- --install-dir=/usr/local/bin --filename=composer
ENV COMPOSER_HOME=/var/cache/composer
COPY docker/www.conf /usr/local/etc/php-fpm.d/
COPY docker/nginx-app.conf /etc/nginx/http.d/default.conf
@@ -44,6 +44,7 @@ COPY docker/nginx-app.conf /etc/nginx/http.d/default.conf
COPY docker/init /sbin/
RUN chmod 550 /sbin/init && chown 0:0 /sbin/init
VOLUME [ "/var/cache/composer" ]
WORKDIR /var/www/html
EXPOSE 80
ENTRYPOINT [ "/sbin/init" ]