Giter VIP home page Giter VIP logo

phpipam's Introduction

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

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 443:443 -e MYSQL_ENV_MYSQL_PASSWORD=my-secret-pw --name ipam --link phpipam-mysql:mysql robwilkes/phpipam

We are linking the two containers and expose the HTTP port.

Specific integration (HTTPS, multi-host containers, etc.)

No longer creates a self-signed certificate, there are many issues with this, including issues with Firefox as the certificate is marked as a CA.

Instead, create the following two files: ssl/private/ssl-cert-snakeoil.key ssl/certs/ssl-cert-snakeoil.pem

And map the ssl directory as a docker volume:

$ docker run -ti -d -p 443:443 -v ssl:/etc/ssl -e MYSQL_ENV_MYSQL_PASSWORD=my-secret-pw --name ipam --link phpipam-mysql:mysql robwilkes/phpipam

Configuration

  • Browse to https://<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 also create an all-in-one YAML deployment descriptor with Docker compose, like this:

version: "3.7"

services:
  phpipam:
    image: robwilkes/phpipam
    environment:
      - MYSQL_HOST=mysql
    ports:
      - "80:80"
      - "443:443"
    links:
      - mysql
    depends_on:
      - mysql
    volumes:
      - ./ssl:/etc/ssl

  mysql:
    image: mysql:5.7
    env_file:
      - db.env
    volumes:
      - ./mysql:/var/lib/mysql

You can also include an SMTP server by updating your docker-compose.yml as follows:

version: "3.7"

services:
  phpipam:
    image: robwilkes/phpipam
    environment:
      - MYSQL_HOST=mysql
    ports:
      - "80:80"
      - "443:443"
    links:
      - mysql
      - smtp
    depends_on:
      - mysql
      - smtp
    volumes:
      - ./ssl:/etc/ssl

  mysql:
    image: mysql:5.7
    env_file:
      - db.env
    volumes:
      - ./mysql:/var/lib/mysql
  
  smtp:
    image: namshi/smtp

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.