Merge branch 'f-breidenstein-better_dockerfile'
This commit is contained in:
commit
99972b5f7b
21
Dockerfile
21
Dockerfile
|
@ -3,15 +3,24 @@ FROM php:apache
|
|||
RUN apt-get update && apt-get install -y \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libpng12-dev \
|
||||
libpng-dev \
|
||||
wget \
|
||||
zip \
|
||||
unzip; \
|
||||
unzip && \
|
||||
# We install and enable php-gd
|
||||
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/; \
|
||||
docker-php-ext-install -j$(nproc) gd; \
|
||||
|
||||
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ &&\
|
||||
docker-php-ext-install -j$(nproc) gd && \
|
||||
# We enable Apache's mod_rewrite
|
||||
a2enmod rewrite
|
||||
|
||||
COPY . .
|
||||
|
||||
# Copy app content
|
||||
COPY . /var/www/html
|
||||
|
||||
# Copy start script
|
||||
RUN mv /var/www/html/docker/entrypoint.sh / && \
|
||||
rm -r /var/www/html/docker
|
||||
|
||||
VOLUME /var/www/html/data
|
||||
|
||||
CMD /entrypoint.sh
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
privatebin:
|
||||
build: .
|
||||
ports:
|
||||
- "3000:80"
|
||||
volumes:
|
||||
- data:/var/www/html/data
|
||||
# Optionally mount a custom config file
|
||||
#- /srv/docker/privatebin/conf.php:/var/www/html/cfg/conf.php
|
||||
|
||||
volumes:
|
||||
data:
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#! /bin/sh
|
||||
|
||||
chown -R www-data /var/www/html/data
|
||||
apache2-foreground
|
Loading…
Reference in New Issue