PacketFence running inside a Docker container
10K+
https://github.com/wtelecom/dockerized-packetfence/
This image is based on the official ubuntu 12.04 (precise) docker hub image.
The recipe install packetfence, its dependencies and supervisor.
The container will run supervisord as main process in order to manage the execution of several services needed by packetfence.
This may sound like breaking the Docker best practices, but in this case the complete packetfence service must be considered as a unique service (although we know that is composed of other microservices). Packetfence interacts tightly with several processes and he wants to have the control, so it is not possible to have them in separate containers.
Docker also explain how to run several proceses in a container with supervisor
Mysql is the only service that might be separated, but at the moment it's included to keep the Packetfence configuration simply. In future releases it will be in a separate container and with data volumes.
Docker-compose takes care of the deploy process.
Once the container has been built, docker-compose runs it with this custom options:
privileged: packetfence requires several privileges, like namespaces management. Because of this, the container has to be executed as privileged.
host network: the container will be launched with full access to the host network stack. This is another requisite for packetfence.
kernel modules as volume: at any point, packetfence accesses to /lib/modules/-generic. So it has to be accessible in the container.
The launch command_ for the container is the supervisor daemon. Supervisor will take care of running packetfence and mysqld.
Use this docker-compose.yml file as base.
pf:
image: josefuentes/packetfence
privileged: true
net: "host"
volumes:
- "/lib/modules/:/lib/modules/"
restart: always
command: /usr/bin/supervisord
Content type
Image
Digest
sha256:050d1ed6b…
Size
285.1 MB
Last updated
almost 11 years ago
docker pull josefuentes/packetfence