Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Sam Burney
docker-phpipam
Commits
819bea59
Commit
819bea59
authored
9 years ago
by
pierrecdn
Browse files
Options
Download
Email Patches
Plain Diff
Initial commit
parent
faf4b78a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
171 additions
and
0 deletions
+171
-0
Dockerfile
Dockerfile
+37
-0
README.md
README.md
+62
-0
php.ini
php.ini
+72
-0
No files found.
Dockerfile
0 → 100644
View file @
819bea59
FROM
php:5.6-apache
MAINTAINER
Pierre Cheynier <pierre.cheynier@sfr.com>
ENV
PHPIPAM_SOURCE https://github.com/phpipam/phpipam/archive/
ENV
PHPIPAM_VERSION 1.16.003
# Install required deb packages
RUN
apt-get update
&&
\
apt-get install -y git php-pear php5-curl php5-mysql php5-json php5-gmp php5-mcrypt php5-ldap libgmp-dev && \
rm -rf /var/lib/apt/lists/*
# Configure apache and required PHP modules
RUN
docker-php-ext-configure mysqli
--with-mysqli
=
mysqlnd
&&
\
docker-php-ext-install mysqli
&&
\
docker-php-ext-install pdo_mysql
&&
\
docker-php-ext-install gettext
&&
\
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h && \
docker-php-ext-configure gmp --with-gmp=/usr/include/x86_64-linux-gnu && \
docker-php-ext-install gmp && \
echo ". /etc/environment" >> /etc/apache2/envvars && \
a2enmod rewrite
COPY
php.ini /usr/local/etc/php/
# copy phpipam sources to web dir
ADD
${PHPIPAM_SOURCE}/${PHPIPAM_VERSION}.tar.gz /tmp/
RUN
tar
-xzf
/tmp/
${
PHPIPAM_VERSION
}
.tar.gz
-C
/var/www/html/
--strip-components
=
1
# Use system environment variables into config.php
RUN
sed
-i
\
-e "s/\['host'\] = \"localhost\"/\['host'\] = \"mysql\"/" \
-e "s/\['user'\] = \"phpipam\"/\['user'\] = \"root\"/" \
-e "s/\['pass'\] = \"phpipamadmin\"/\['pass'\] = getenv(\"MYSQL_ENV_MYSQL_ROOT_PASSWORD\")/" \
/var/www/html/config.php
EXPOSE
80
This diff is collapsed.
Click to expand it.
README.md
0 → 100644
View file @
819bea59
# docker-phpipam
phpIPAM is an open-source web IP address management application. Its goal is to provide light and simple IP address management application.
phpIPAM is developed and maintained by Miha Petkovsek, released under the GPL v3 license, project source is
[
here
](
https://github.com/phpipam/phpipam
)
Learn more on
[
phpIPAM homepage
](
http://phpipam.net
)

## How to use this Docker image
### Mysql
Run a MySQL database, dedicated to phpipam
```
bash
$
docker run
--name
phpipam-mysql
-e
MYSQL_ROOT_PASSWORD
=
my-secret-pw
-v
/my_dir/phpipam:/var/lib/mysql
-d
mysql:5.6
```
Here, we store data on the host system under [
`/my_dir/phpipam`
] and use a specific root password.
### Phpipam
```
bash
$
docker run
-ti
-d
-p
80:80
--name
ipam
--link
phpipam-mysql:mysql phpipam
```
We are linking the two containers and expose the HTTP port.
### Specific integration (HTTPS, multi-host containers, etc.)
Regarding your requirements and docker setup, you've to expose resources.
For HTTPS, run a reverse-proxy in front of your phpipam container and link it to.
For multi-host containers, expose ports, run etcd or consul to make service discovery works etc.
### Configuration
*
Browse to
`http://<ip>[:<specific_port>]/`
*
Step 1 : Choose 'Automatic database installation'

*
Step 2 : Re-Enter connection information

*
Note that these two first steps could be swapped by patching phpipam (see https://github.com/phpipam/phpipam/issues/25)
*
Step 3 : Configure the admin user password

*
You're done !

### Notes
phpIPAM is under heavy development by the amazing Miha.
To upgrade the release version, just change the
`PHPIPAM_VERSION`
environment variable to the target release (see https://github.com/phpipam/phpipam/releases)
This diff is collapsed.
Click to expand it.
php.ini
0 → 100644
View file @
819bea59
[PHP]
engine
=
On
short_open_tag
=
Off
precision
=
14
output_buffering
=
4096
zlib.output_compression
=
Off
implicit_flush
=
Off
serialize_precision
=
17
zend.enable_gc
=
On
expose_php
=
On
max_execution_time
=
30
max_input_time
=
60
error_reporting
=
E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors
=
On
log_errors
=
On
log_errors_max_len
=
1024
default_mimetype
=
"text/html"
default_charset
=
"UTF-8"
file_uploads
=
On
upload_max_filesize
=
2M
max_file_uploads
=
20
allow_url_fopen
=
On
allow_url_include
=
Off
default_socket_timeout
=
60
[Date]
date.timezone
=
"US/Central"
[mail function]
smtp_port
=
25
mail.add_x_header
=
On
[SQL]
sql.safe_mode
=
Off
[MySQLi]
mysqli.max_persistent
=
-1
mysqli.allow_persistent
=
On
mysqli.max_links
=
-1
mysqli.cache_size
=
2000
mysqli.default_port
=
3306
mysqli.reconnect
=
Off
[mysqlnd]
mysqlnd.collect_statistics
=
On
mysqlnd.collect_memory_statistics
=
Off
[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
=
1
session.gc_divisor
=
1000
session.gc_maxlifetime
=
1440
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"
[ldap]
ldap.max_links
=
-1
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment