mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
feat: add dockerfile and instructions
This commit is contained in:
parent
bace59de78
commit
eedad763dc
3 changed files with 33 additions and 0 deletions
15
Dockerfile
Normal file
15
Dockerfile
Normal 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"]
|
|
@ -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
|
||||
|
|
0
nvchecker_source/__init__.py
Normal file
0
nvchecker_source/__init__.py
Normal file
Loading…
Add table
Reference in a new issue