Public | Automated Build

Last pushed: 4 months ago
Short Description
phpIPAM web IP address management application.
Full Description

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

Learn more on phpIPAM homepage

How to use this Docker image

Mysql

Run a MySQL database, dedicated to phpipam

$ 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

$ docker run -ti -d -p 80:80 --name ipam --link phpipam-mysql:mysql pierrecdn/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>]/install/
  • Step 1 : Choose 'Automatic database installation'

  • Step 2 : Re-Enter connection information

  • You're done !

Docker compose

You can also create an all-in-one YAML deployment descriptor with Docker compose, like this:

version: '2'

services:
  mysql:
    image: mysql:5.6
    environment:
      - MYSQL_ROOT_PASSWORD=my-secret-pw
    restart: always
    volumes:
      - db_data:/var/lib/mysql
  ipam:
    depends_on:
      - mysql
    image: pierrecdn/phpipam
    environment:
      - MYSQL_ENV_MYSQL_ROOT_PASSWORD=my-secret-pw
    ports:
      - "80:80"
volumes:
  db_data:

And next :

$ docker-compose up -d

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 here)

Docker Pull Command
Owner
pierrecdn
Source Repository

Comments (9)
akuechler
3 months ago

If you want to use the "scan network" feature it is necessary to add:
docker-php-ext-install pcntl && \
to the Dockerfile. Otherwise the pcntl module is not available to php.

pedrohgv
10 months ago

I'm having a issue; when I bind the container to any other port rather than 80, an "/upgrade/" suffix appears at the url and Firefox says "The page you are trying to view cannot be shown because an error in the data transmission was detected.". I'm trying to use another port, because I'm using Nginx on port 80. Can anyone help me?

pumpkin35
2 years ago

For me forwarding ports doesn't work on install with 1.16.003-1 with port 8008 forwarded to 80:

Page source for http:<ip-address>:8008/install shows

...

<base href="http://<ip-address>:8008:8008/">

Then obviously everything else fails.
Any ideas?

akonkol
2 years ago

@dezechristophe you need to change your endpoint to http://<ip>[:<specific_port>]/install

dezechristophe
2 years ago

container doesn"t work.
When I go http://<ip>[:<specific_port>]/
I got error 302 and ... nothing

10.72.253.3 - - [25/Sep/2015:06:43:40 +0000] "GET / HTTP/1.1" 302 634 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36"
10.72.253.3 - - [25/Sep/2015:06:43:40 +0000] "GET /?page=upgrade HTTP/1.1" 302 7110 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36"
10.72.253.3 - - [25/Sep/2015:06:43:40 +0000] "GET /?page=login HTTP/1.1" 302 7853 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36"

mancubus
2 years ago

I used custom port for the host machine:
"80/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "3232"
}

Connection successfully established with port 3232, but no response for GET HTTP.
debug logs report:
[Thu Aug 27 14:46:53.186745 2015] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.10 (Debian) PHP/5.6.11 configured -- resuming normal operations
[Thu Aug 27 14:46:53.186793 2015] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

Why apache doesn't display web page?

pierrecdn
2 years ago

Hi,
You're absolutely right.
I've just pushed a new version, tagged 1.16.003-1.
Pierre

willonit
2 years ago

After the container starts running the following commands fixed the error:
apt-get update
apt-get install -y libmcrypt-dev
docker-php-ext-install mcrypt
service apache2 restart

willonit
2 years ago

When trying to enable API access the following error appears.

The following PHP extensions for API server are missing:
mcrypt
Please recompile PHP to include missing extensions for API server

Is this an installation error on my part?