FROM casjaysdevdocker/alpine:latest as build ARG LICENSE=WTFPL \ IMAGE_NAME=ssl-ca \ TIMEZONE=America/New_York \ PORT= ENV SHELL=/bin/bash \ TERM=xterm-256color \ HOSTNAME=${HOSTNAME:-casjaysdev-$IMAGE_NAME} \ TZ=$TIMEZONE RUN mkdir -p /bin/ /config/ /data/ && \ rm -Rf /bin/.gitkeep /config/.gitkeep /data/.gitkeep && \ apk update -U --no-cache COPY ./bin/. /usr/local/bin/ COPY ./config/. /config/ COPY ./data/. /data/ FROM scratch ARG BUILD_DATE="$(date +'%Y-%m-%d %H:%M')" LABEL org.label-schema.name="ssl-ca" \ org.label-schema.description="Containerized version of ssl-ca" \ org.label-schema.url="https://hub.docker.com/r/casjaysdevdocker/ssl-ca" \ org.label-schema.vcs-url="https://github.com/casjaysdevdocker/ssl-ca" \ org.label-schema.build-date=$BUILD_DATE \ org.label-schema.version=$BUILD_DATE \ org.label-schema.vcs-ref=$BUILD_DATE \ org.label-schema.license="$LICENSE" \ org.label-schema.vcs-type="Git" \ org.label-schema.schema-version="latest" \ org.label-schema.vendor="CasjaysDev" \ maintainer="CasjaysDev " ENV SHELL="/bin/bash" \ TERM="xterm-256color" \ HOSTNAME="casjaysdev-ssl-ca" \ TZ="${TZ:-America/New_York}" WORKDIR /root VOLUME ["/root","/config","/data"] EXPOSE $PORT COPY --from=build /. / HEALTHCHECK --interval=15s --timeout=3s CMD ["/usr/local/bin/entrypoint-ssl-ca.sh", "healthcheck"] ENTRYPOINT ["/usr/local/bin/entrypoint-ssl-ca.sh"]