Public Repository

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

#Dockerfile This Was Built With:

FROM debian:squeeze

MAINTAINER GoodwinTek <info@goodwintek.com>

#Add Sources.List and Keys For Unifi and MongoDB#

RUN echo deb http://www.ubnt.com/downloads/unifi/distros/deb/debian debian ubiquiti >> /etc/apt/sources.list
RUN echo deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen >> /etc/apt/sources.list
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C0A52C50
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 7F0CEB10

#Update Package Lists and Install Sudo#

RUN apt-get -y update && apt-get -y install sudo

#Create Unifi User and Give Limited Sudo Priveledges#

RUN useradd -m unifi
RUN touch /etc/sudoers.d/unifi && chmod 440 /etc/sudoers.d/unifi
RUN echo "unifi ALL = NOPASSWD:/usr/bin/apt-get -y install unifi" > /etc/sudoers.d/unifi

#Autostart Unifi Installation Upon Containter Start#

RUN echo "sudo /usr/bin/apt-get -y install unifi" > /home/unifi/.bashrc
USER unifi
CMD /bin/bash

##How to Run (creating the /dockerhdd directory on the host) :
docker run -dit -v /dockerhdd:/var/lib/unifi -p 8081:8081 -p 8080:8080 -p 8443:8443 -p 8880:8880 -p 8843:8843 -p 27117:27117 -p 3478:3478 goodwintek/unifi-installer

##After this is image has been run and installed. Stop the container and run the normal unifi image moving forward.

docker run -dit -v /dockerhdd:/var/lib/unifi -p 8081:8081 -p 8080:8080 -p 8443:8443 -p 8880:8880 -p 8843:8843 -p 27117:27117 -p 3478:3478 goodwintek/unifi
Docker Pull Command
Owner
goodwintek

Comments (0)