mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Updated Dockerfile to support JPEG files in docker. Fixes issue #115.
This commit is contained in:
parent
01084c041e
commit
c5c5ce77e9
1 changed files with 11 additions and 2 deletions
13
Dockerfile
13
Dockerfile
|
@ -1,16 +1,24 @@
|
|||
FROM php:7-apache
|
||||
|
||||
RUN apt-get update && apt-get install -y curl libcurl4-openssl-dev libicu-dev libpng-dev gnupg zip libzip-dev libonig-dev libxslt-dev && rm -rf /var/lib/apt/lists/*
|
||||
# Install needed dependencies for PHP build
|
||||
RUN apt-get update && apt-get install -y pkg-config curl libcurl4-openssl-dev libicu-dev \
|
||||
libpng-dev libjpeg-dev libfreetype6-dev gnupg zip libzip-dev libonig-dev libxslt-dev vim \
|
||||
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install GD (we have to configure GD first before installing it, see issue #115)
|
||||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg && docker-php-ext-install gd
|
||||
# Install other needed PHP extensions
|
||||
RUN docker-php-ext-install pdo_mysql curl intl mbstring bcmath gd zip xml xsl
|
||||
|
||||
# Install yarn
|
||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
||||
RUN apt-get update && apt-get install -y yarn
|
||||
RUN apt-get update && apt-get install -y yarn && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install composer
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Set working dir
|
||||
WORKDIR /var/www/html
|
||||
COPY --chown=www-data:www-data . .
|
||||
|
||||
|
@ -20,6 +28,7 @@ COPY ./.docker/symfony.conf /etc/apache2/sites-available/symfony.conf
|
|||
RUN a2ensite symfony.conf
|
||||
RUN a2enmod rewrite
|
||||
|
||||
# Install composer and yarn dependencies for Part-DB
|
||||
USER www-data
|
||||
RUN composer install -a --no-dev && composer clear-cache
|
||||
RUN yarn install && yarn build && yarn cache clean
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue