diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b6cabd6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.8-alpine +LABEL description="New version checker for software" +ENV DEPENDENCIES libcurl wget gzip +ENV BUILD_DEPENDENCIES curl-dev build-base +ENV PYCURL_SSL_LIBRARY openssl + +COPY . /app +RUN \ + cd /app && \ + apk add --no-cache --virtual .build-dependencies $BUILD_DEPENDENCIES && \ + apk add --no-cache --virtual .dependencies $DEPENDENCIES && \ + python3 setup.py install && \ + apk --purge del .build-dependencies + +CMD ["nvchecker"] diff --git a/docs/usage.rst b/docs/usage.rst index 6eb8782..7c2917c 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -48,6 +48,24 @@ Run with one or more software version files:: You normally will like to specify some "version record files"; see below. +Docker +------ +Nvchecker can be run in a Docker container without the need to install locally. + +To build the container:: + + docker build . --tag nvchecker + +To run the container and see available options:: + + docker run nvchecker nvchecker --help + +Because nvchecker persists version record files, you may wish to mount a volume +for configuration and version record files. This example assumes that the +configuration file and both version record files are location in ``/config``:: + + docker run -v $(pwd)/config:/config nvchecker nvchecker -c /config/nvchecker.toml + JSON logging ~~~~~~~~~~~~ With ``--logger=json`` or ``--logger=both``, you can get a structured logging diff --git a/nvchecker_source/__init__.py b/nvchecker_source/__init__.py new file mode 100644 index 0000000..e69de29