feat: add dockerfile and instructions

This commit is contained in:
Winston Astrachan 2020-12-16 12:40:35 -05:00
parent bace59de78
commit eedad763dc
No known key found for this signature in database
GPG key ID: 19458EC7CC6028D6
3 changed files with 33 additions and 0 deletions

15
Dockerfile Normal file
View file

@ -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"]

View file

@ -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

View file