Skip to content

Commit

Permalink
[docker] define a volume containing the config file (fixes #158) (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertodonato committed Jan 17, 2024
1 parent 7f1e7aa commit 852f949
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@ ENV VIRTUAL_ENV="/virtualenv"
ENV LD_LIBRARY_PATH="/opt/oracle/instantclient"

EXPOSE 9560/tcp
VOLUME /config
# IPv6 support is not enabled by default, only bind IPv4
ENTRYPOINT ["query-exporter", "/config.yaml", "-H", "0.0.0.0"]
ENTRYPOINT ["query-exporter", "/config/config.yaml", "-H", "0.0.0.0"]
16 changes: 10 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -557,14 +557,18 @@ Run in Docker
``query-exporter`` can be run inside Docker_ containers, and is available from
the `Docker Hub`_::

docker run -p 9560:9560/tcp -v "$CONFIG_FILE:/config.yaml" --rm -it adonato/query-exporter:latest
docker run --rm -it -p 9560:9560/tcp -v "$CONFIG_DIR:/config" adonato/query-exporter:latest

where ``$CONFIG_FILE`` is the absolute path of the configuration file to
use. Note that the image expects the file to be available as ``/config.yaml``
in the container.
where ``$CONFIG_DIR`` is the absolute path of a directory containing a
``config.yaml`` file, the configuration file to use. Alternatively, a volume
name can be specified.


A different ODBC driver version to use can be specified during image building,
by passing ``--build-arg ODBC_bVERSION_NUMBER``, e.g.::

docker build . --build-arg ODBC_DRIVER_VERSION=17

For other ODBC versions, build the image with --build-arg VERSION_NUMBER:
docker build --build-arg ODBC_DRIVER_VERSION=17

The image has support for connecting the following databases:

Expand Down

0 comments on commit 852f949

Please sign in to comment.