forked from OpenPDU/acf-openpdu
added support for testing in docker
This commit is contained in:
@@ -32,7 +32,7 @@ mymodule.updatestatus = function()
|
|||||||
elseif (tonumber(v) == 1) then
|
elseif (tonumber(v) == 1) then
|
||||||
s = "Off"
|
s = "Off"
|
||||||
else
|
else
|
||||||
s = "unknown (" .. v .. ")"
|
s = "unknown (" .. tostring(v) .. ")"
|
||||||
end
|
end
|
||||||
config[i].status = s
|
config[i].status = s
|
||||||
end
|
end
|
||||||
|
|||||||
17
docker/Dockerfile
Normal file
17
docker/Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
FROM alpine:3.7
|
||||||
|
|
||||||
|
ADD https://openpdu.github.io/alpine/devel@openpdu.org-5a7816cb.rsa.pub /etc/apk/keys
|
||||||
|
|
||||||
|
RUN echo "https://openpdu.github.io/alpine/v3.7/main" >> /etc/apk/repositories && \
|
||||||
|
apk --no-cache -U upgrade && \
|
||||||
|
apk --no-cache -U add acf-openpdu alpine-base && \
|
||||||
|
echo root:root | chpasswd && \
|
||||||
|
setup-acf
|
||||||
|
|
||||||
|
#ADD start.sh /
|
||||||
|
|
||||||
|
EXPOSE 443
|
||||||
|
|
||||||
|
#ENTRYPOINT ["/bin/sh"]
|
||||||
|
ENTRYPOINT ["/usr/sbin/mini_httpd","-D","-C","/etc/mini_httpd/mini_httpd.conf"]
|
||||||
|
|
||||||
1
docker/build.sh
Executable file
1
docker/build.sh
Executable file
@@ -0,0 +1 @@
|
|||||||
|
docker build . -t acf-openpdu:latest
|
||||||
3
docker/start.sh
Executable file
3
docker/start.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
MYDIR=$(cd "$(dirname "$0")/../acf-app" ; pwd -P)
|
||||||
|
docker run --rm -d -v "$MYDIR:/usr/share/acf/app/openpdu/" -p 443 acf-openpdu:latest
|
||||||
|
|
||||||
Reference in New Issue
Block a user