checks write access and connectivity based on #52

This commit is contained in:
Henning Bocklage 2020-12-03 12:45:08 +01:00
parent 4437eeaf45
commit 862c7e1ae4
4 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,7 @@
FROM lsiobase/alpine:3.12
ARG BUILDDATE
ENV BUILDDATEENV=${BUILDDATE}
LABEL \
app.deemix.image.created="${BUILDDATE}" \

View File

@ -11,6 +11,7 @@ FROM lsiobase/alpine:arm32v7-3.12
COPY --from=builder qemu-arm-static /usr/bin
ARG BUILDDATE
ENV BUILDDATEENV=${BUILDDATE}
LABEL \
app.deemix.image.created="${BUILDDATE}" \

View File

@ -10,6 +10,7 @@ FROM lsiobase/alpine:arm64v8-3.12
COPY --from=builder qemu-aarch64-static /usr/bin
ARG BUILDDATE
ENV BUILDDATEENV=${BUILDDATE}
LABEL \
app.deemix.image.created="${BUILDDATE}" \

View File

@ -0,0 +1,8 @@
#!/usr/bin/with-contenv bash
# test write access to download and config folder and test internet connectivity
printf '[cont-init.d] Testing Access\n' && \
printf '%-50s %2s %-5s \n' "[cont-init.d] Container Builddate" ":" "$BUILDDATEENV" && \
if [ -w "/downloads" ]; then printf '%-50s %2s %-5s \n' "[cont-init.d] Download Folder Write Access" ":" "Success"; else printf '%-50s %2s %-5s \n' "[cont-init.d] Download Folder Write Access" ":" "Failure"; fi && \
if [ -w "/config" ]; then printf '%-50s %2s %-5s \n' "[cont-init.d] Config Folder Write Access" ":" "Success"; else printf '%-50s %2s %-5s \n' "[cont-init.d] Config Folder Write Access" ":" "Failure"; fi && \
if ping -c 1 1.1.1.1 &> /dev/null; then printf '%-50s %2s %-5s \n' "[cont-init.d] Internet Access" ":" "Success"; else printf '%-50s %2s %-5s \n' "[cont-init.d] Internet Access" ":" "Failure"; fi