added support for testing in docker

This commit is contained in:
2018-02-11 19:10:01 +01:00
parent 22651ed58a
commit 41c3cf09e1
4 changed files with 22 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ mymodule.updatestatus = function()
elseif (tonumber(v) == 1) then
s = "Off"
else
s = "unknown (" .. v .. ")"
s = "unknown (" .. tostring(v) .. ")"
end
config[i].status = s
end

17
docker/Dockerfile Normal file
View 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
View File

@@ -0,0 +1 @@
docker build . -t acf-openpdu:latest

3
docker/start.sh Executable file
View 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