mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 10:56:23 +00:00
created a build for custom containers
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# BUILD ME:
|
# BUILD ME:
|
||||||
# docker build -t nick/lamp .
|
# docker build -t nick/ubuntu-apache-php .
|
||||||
|
|
||||||
# Dockerfile for ubuntu
|
# Dockerfile for ubuntu
|
||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
@@ -37,7 +37,7 @@ services:
|
|||||||
- admin_web
|
- admin_web
|
||||||
|
|
||||||
lamp:
|
lamp:
|
||||||
image: nick/lamp
|
image: nick/ubuntu-apache-php:latest
|
||||||
restart: always
|
restart: always
|
||||||
links:
|
links:
|
||||||
- mariadb
|
- mariadb
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
<VirtualHost *:80>
|
|
||||||
ServerName docker
|
|
||||||
ServerAdmin c@nickyeoman.com
|
|
||||||
DocumentRoot /var/www/html
|
|
||||||
#ErrorLog /var/log/apache2/error.log
|
|
||||||
#CustomLog /var/log/apache2/access.log combined
|
|
||||||
# You need to use x-forward
|
|
||||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
|
||||||
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
|
|
||||||
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
|
|
||||||
CustomLog "/var/log/apache2/access.log" combined env=!forwarded
|
|
||||||
CustomLog "/var/log/apache2/access.log" proxy env=forwarded
|
|
||||||
|
|
||||||
|
|
||||||
<Directory /var/www/html>
|
|
||||||
Options +Indexes +FollowSymLinks -MultiViews
|
|
||||||
AllowOverride All
|
|
||||||
Require all granted
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
</VirtualHost>
|
|
||||||
@@ -1,185 +0,0 @@
|
|||||||
[PHP]
|
|
||||||
; Nick Yeoman made this for bionic
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;
|
|
||||||
; Language Options ;
|
|
||||||
;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
engine = On
|
|
||||||
short_open_tag = Off
|
|
||||||
precision = 14
|
|
||||||
output_buffering = Off
|
|
||||||
zlib.output_compression = Off
|
|
||||||
implicit_flush = Off
|
|
||||||
unserialize_callback_func =
|
|
||||||
serialize_precision = 17
|
|
||||||
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
|
||||||
disable_classes =
|
|
||||||
zend.enable_gc = On
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;
|
|
||||||
; Miscellaneous ;
|
|
||||||
;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
expose_php = Off
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;
|
|
||||||
; Resource Limits ;
|
|
||||||
;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
max_execution_time = 30
|
|
||||||
max_input_time = 60
|
|
||||||
memory_limit = 512M
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
; Error handling and logging ;
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
|
||||||
display_errors = Off
|
|
||||||
display_startup_errors = Off
|
|
||||||
log_errors = On
|
|
||||||
log_errors_max_len = 1024
|
|
||||||
ignore_repeated_errors = Off
|
|
||||||
ignore_repeated_source = Off
|
|
||||||
report_memleaks = On
|
|
||||||
track_errors = Off
|
|
||||||
html_errors = On
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;
|
|
||||||
; Data Handling ;
|
|
||||||
;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
variables_order = "GPCS"
|
|
||||||
request_order = "GP"
|
|
||||||
register_argc_argv = Off
|
|
||||||
auto_globals_jit = On
|
|
||||||
post_max_size = 99M
|
|
||||||
auto_prepend_file =
|
|
||||||
auto_append_file =
|
|
||||||
default_mimetype = "text/html"
|
|
||||||
default_charset = "UTF-8"
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
; Paths and Directories ;
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
doc_root =
|
|
||||||
user_dir =
|
|
||||||
enable_dl = Off
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;
|
|
||||||
; File Uploads ;
|
|
||||||
;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
file_uploads = On
|
|
||||||
upload_max_filesize = 99M
|
|
||||||
max_file_uploads = 20
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;
|
|
||||||
; Fopen wrappers ;
|
|
||||||
;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
allow_url_fopen = On
|
|
||||||
allow_url_include = Off
|
|
||||||
default_socket_timeout = 60
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;
|
|
||||||
; Module Settings ;
|
|
||||||
;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
[CLI Server]
|
|
||||||
cli_server.color = On
|
|
||||||
|
|
||||||
[Pdo_mysql]
|
|
||||||
pdo_mysql.cache_size = 2000
|
|
||||||
pdo_mysql.default_socket=
|
|
||||||
|
|
||||||
[mail function]
|
|
||||||
SMTP = localhost
|
|
||||||
smtp_port = 25
|
|
||||||
mail.add_x_header = On
|
|
||||||
|
|
||||||
[SQL]
|
|
||||||
sql.safe_mode = Off
|
|
||||||
|
|
||||||
[ODBC]
|
|
||||||
odbc.allow_persistent = On
|
|
||||||
odbc.check_persistent = On
|
|
||||||
odbc.max_persistent = -1
|
|
||||||
odbc.max_links = -1
|
|
||||||
odbc.defaultlrl = 4096
|
|
||||||
odbc.defaultbinmode = 1
|
|
||||||
|
|
||||||
[Interbase]
|
|
||||||
ibase.allow_persistent = 1
|
|
||||||
ibase.max_persistent = -1
|
|
||||||
ibase.max_links = -1
|
|
||||||
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
|
|
||||||
ibase.dateformat = "%Y-%m-%d"
|
|
||||||
ibase.timeformat = "%H:%M:%S"
|
|
||||||
|
|
||||||
[MySQLi]
|
|
||||||
mysqli.max_persistent = -1
|
|
||||||
mysqli.allow_persistent = On
|
|
||||||
mysqli.max_links = -1
|
|
||||||
mysqli.cache_size = 2000
|
|
||||||
mysqli.default_port = 3306
|
|
||||||
mysqli.default_socket =
|
|
||||||
mysqli.default_host =
|
|
||||||
mysqli.default_user =
|
|
||||||
mysqli.default_pw =
|
|
||||||
mysqli.reconnect = Off
|
|
||||||
|
|
||||||
[mysqlnd]
|
|
||||||
mysqlnd.collect_statistics = On
|
|
||||||
mysqlnd.collect_memory_statistics = Off
|
|
||||||
|
|
||||||
[PostgreSQL]
|
|
||||||
pgsql.allow_persistent = On
|
|
||||||
pgsql.auto_reset_persistent = Off
|
|
||||||
pgsql.max_persistent = -1
|
|
||||||
pgsql.max_links = -1
|
|
||||||
pgsql.ignore_notice = 0
|
|
||||||
pgsql.log_notice = 0
|
|
||||||
|
|
||||||
[bcmath]
|
|
||||||
bcmath.scale = 0
|
|
||||||
|
|
||||||
[Session]
|
|
||||||
session.save_handler = files
|
|
||||||
session.use_strict_mode = 0
|
|
||||||
session.use_cookies = 1
|
|
||||||
session.use_only_cookies = 1
|
|
||||||
session.name = PHPSESSID
|
|
||||||
session.auto_start = 0
|
|
||||||
session.cookie_lifetime = 0
|
|
||||||
session.cookie_path = /
|
|
||||||
session.cookie_domain =
|
|
||||||
session.cookie_httponly =
|
|
||||||
session.serialize_handler = php
|
|
||||||
session.gc_probability = 0
|
|
||||||
session.gc_divisor = 1000
|
|
||||||
session.gc_maxlifetime = 1440
|
|
||||||
session.referer_check =
|
|
||||||
session.cache_limiter = nocache
|
|
||||||
session.cache_expire = 180
|
|
||||||
session.use_trans_sid = 0
|
|
||||||
session.hash_function = 0
|
|
||||||
session.hash_bits_per_character = 5
|
|
||||||
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
|
|
||||||
|
|
||||||
[Assertion]
|
|
||||||
zend.assertions = -1
|
|
||||||
|
|
||||||
[Tidy]
|
|
||||||
tidy.clean_output = Off
|
|
||||||
|
|
||||||
[soap]
|
|
||||||
soap.wsdl_cache_enabled=1
|
|
||||||
soap.wsdl_cache_dir="/tmp"
|
|
||||||
soap.wsdl_cache_ttl=86400
|
|
||||||
soap.wsdl_cache_limit = 5
|
|
||||||
|
|
||||||
[ldap]
|
|
||||||
ldap.max_links = -1
|
|
||||||
@@ -17,7 +17,7 @@ networks:
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
lap:
|
lap:
|
||||||
image: nick/lamp
|
image: nick/ubuntu-apache-php:latest
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- admin_web
|
- admin_web
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
# BUILD ME:
|
|
||||||
# docker build -t nick/lamp .
|
|
||||||
|
|
||||||
# Dockerfile for ubuntu
|
|
||||||
FROM ubuntu:bionic
|
|
||||||
MAINTAINER Nick Yeoman (c@nickyeoman.com)
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
|
||||||
|
|
||||||
# install apache
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get install -y --no-install-recommends apache2
|
|
||||||
|
|
||||||
RUN a2enmod socache_shmcb ssl expires rewrite headers
|
|
||||||
|
|
||||||
#Install php
|
|
||||||
# each individually makes debuging easier
|
|
||||||
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q php
|
|
||||||
RUN apt-get install -y php-imagick
|
|
||||||
RUN apt-get install -y php-gd php-curl
|
|
||||||
RUN apt-get install -y php-intl
|
|
||||||
RUN apt-get install -y php-json
|
|
||||||
RUN apt-get install -y php-memcache
|
|
||||||
RUN apt-get install -y php-mbstring
|
|
||||||
RUN apt-get install -y libapache2-mod-php7.2
|
|
||||||
RUN apt-get install -y php7.2-xml
|
|
||||||
RUN apt-get install -y php7.2-zip
|
|
||||||
RUN apt-get install -y php7.2-mbstring
|
|
||||||
RUN apt-get install -y php7.2-mysql
|
|
||||||
|
|
||||||
COPY config/php.ini /etc/php/7.2/apache2/php.ini
|
|
||||||
|
|
||||||
#Configure apache
|
|
||||||
RUN servername="ServerName docker.fbot.co"
|
|
||||||
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
|
|
||||||
RUN rm /etc/apache2/sites-available/000-default.conf
|
|
||||||
COPY config/000-default.conf /etc/apache2/sites-available/000-default.conf
|
|
||||||
|
|
||||||
# Cleanup: remove lists
|
|
||||||
RUN rm -r /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Default command
|
|
||||||
CMD ["apachectl", "-D", "FOREGROUND"]
|
|
||||||
|
|
||||||
# Ports
|
|
||||||
EXPOSE 80
|
|
||||||
Reference in New Issue
Block a user