switch apidocjs to use node 14 image as base

fix typo in php7.2 Dockerfile
This commit is contained in:
2020-05-17 09:19:50 -04:00
parent e4f03d3702
commit 4a38cc16f4
5 changed files with 33 additions and 33 deletions

View File

@@ -1,13 +1,21 @@
# Using alpine linux for small image
# - http://gliderlabs.viewdocs.io/docker-alpine/
FROM alpine:3.4
FROM node:14.2-alpine
MAINTAINER Richard Morgan <r_morgan@sympatico.ca>
LABEL version=2.0
LABEL version=1.0 \
"usage"="docker run --rm --name apidocker -v <source dir>:/src -it apidocker" \
"env"="DOCS_DIR, APP_DIR, FILE_FILTER"
ENV DOCS_DIR="build/docs/" \
APP_DIR="app/" \
FILE_FILTER=".[php]$"
# install system packages
RUN apk --no-cache add \
nodejs \
&& npm install apidoc -g
WORKDIR /src
ADD ./entrypoint-apidocs.sh /scripts/entrypoint.sh
RUN chmod +x -R /scripts && mkdir /src
ENTRYPOINT /scripts/entrypoint.sh

View File

@@ -1,6 +1,14 @@
#!/usr/bin/env bash
set -e
#set -x
#build
docker build --rm -f Dockerfile -t apidocjs:latest .
#test
docker run --rm --entrypoint=node apidocjs --version
docker run --rm apidocjs apidoc | grep 'apidoc.json'
#save
docker tag apidocjs:latest dkregistry.xai-corp.net:5000/xaicorp/apidocjs:latest
docker push dkregistry.xai-corp.net:5000/xaicorp/apidocjs:latest

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env sh
set -e
#set -x
echo Building docs into: "${DOCS_DIR}"
echo Reading Source files from "${APP_DIR}"
echo Using file filter: "${FILE_FILTER}"
echo
cd /src/ || exit
echo ${APP_DIR} : ${DOCS_DIR} : ${FILE_FILTER}
rm -rf ${DOCS_DIR} && mkdir -p ${DOCS_DIR}
apidoc -i ${APP_DIR} -o ${DOCS_DIR} -f ${FILE_FILTER}