Windows NanoServer Container image with Ubiquiti UniFi Controller v5.5.19
239
docker pull imdocked/unifimkdir c:\Docker\UniFi\datadocker run -d --hostname unifi -v c:\Docker\UniFi\data:c:\unifi\data imdocked/unifiping unifiThe Image is build with a multi-stage dockerfile to keep footprint as small as possible.
The first stage is using the microsoft/windowsservercore. In this stage the installation packages are downloaded and extracted.
The second/final stage copies the files from the first stage and configures the image for execution. This stage used the microsoft/nanoserver image as a base.
docker network create -d transparent --gateway=192.168.11.1 --subnet=192.168.11.0/24 \
-o com.docker.network.windowsshim.dnssuffix=docker.local \
-o com.docker.network.windowsshim.dnsservers=192.168.11.1 MyNet
docker build --network=MyNet -t imdocked/unifi "c:\docker\unifi"
# docker push imdocked/unifi
mkdir c:\Docker\UniFi\data
docker run -d -v c:\Docker\UniFi\data:c:\unifi\data --network=MyNet --hostname unifi --mac-address 12:34:56:78:89:00 --ip 192.168.11.6 -p 8080:8080 -p 8443:8443 imdocked/unifi
FROM microsoft/windowsservercore as downloadbase
ADD http://www.7-zip.org/a/7z1700-x64.exe 7zip_installer.exe
ADD http://dl.ubnt.com/unifi/5.5.19/UniFi-installer.exe UniFi-installer.exe
ADD http://javadl.oracle.com/webapps/download/AutoDL?BundleId=220315_d54c1d3a095b4ff2b6607d096fa80163 jre.exe
# Use PowerShell as the default shell
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
WORKDIR c:/
# Remark: 7zip outputdirectory folder issue resolved by adding @ character (last character gets removed)
RUN \
start-process -wait -passthru -filepath 7zip_installer.exe -argumentlist "/S,/D=c:\\7zz" ; \
Remove-Item C:\7zip_installer.exe; \
New-Item -Type directory c:\files\\unifi ; \
start-process -passthru -wait -filepath C:\7z\7z.exe -argumentlist 'x -oc:\\files\\unifi c:\\UniFi-installer.exe' ; \
Remove-Item -Recurse -Force c:\UniFi-installer.exe ; \
Remove-Item -Recurse -Force c:\7z ;
RUN \
start-process -filepath jre.exe -passthru -wait -argumentlist "/s,INSTALLDIR=c:\files\\java,/L,install64.log" ; \
Remove-Item jre.exe ;
FROM microsoft/nanoserver
COPY --from=downloadbase files/ /
EXPOSE 8080 8443
WORKDIR c:/unifi/bin/
ENTRYPOINT [ "start.bat" ]
LABEL author="Sander Schutten" version="5.5.19" description="UniFi Controller v5.5.19 / jre v8.131"
# Use PowerShell as the default shell
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value ($Env:path + ';c:\java\bin');
Content type
Image
Digest
Size
609.9 MB
Last updated
about 9 years ago
docker pull imdocked/unifi