Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mhzawadi/phpipam

 
 

Repository files navigation

docker-phpipam

GitHub Repo stars GitHub Workflow Status Docker Pulls Docker Stars

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

phpIPAM logo

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 mhzawadi/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'

step1

  • Step 2 : Re-Enter connection information

step2

  • Note that these two first steps could be swapped by patching phpipam (see phpipam/phpipam#25)
  • Step 3 : Configure the admin user password

step3

  • You're done !

done

Docker compose

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

ipam:
  image: mhzawadi/phpipam
  ports:
    - "80:80"
  links:
    - phpipam-mysql
phpipam-mysql:
  image: mysql:5.6
  environment:
   - MYSQL_ROOT_PASSWORD=my-secret-pw
  volumes:
   - /my_dir/phpipam:/var/lib/mysql

And next :

docker-compose up -d

Environment variables summary

  • TZ: the timezone for PHP
  • MYSQL_HOST: the MySQL server
  • MYSQL_USER: the sername for MySQL
  • MYSQL_PASSWORD: the password for MySQL
  • MYSQL_DB: the MySQL database

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)

Building and versions

This image has been build with github actions to allow for arm and amd images, the version is in two parts. Part 1 is the software version, part 2 in the build number.

E.g. 1.4.1.2 - 1.4.1 is the software version, .2 is the build number.

how to build

Latest is build from the docker hub once I push to the github repo, the arm versions are built from my mac with the below buildx tool

docker buildx build --platform linux/amd64,linux/arm64 -t mhzawadi/phpipam:v1.4.0.1 --push .

About

phpIPAM Docker image

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 51.5%
  • PHP 35.1%
  • Dockerfile 9.3%
  • Shell 4.1%