提交 42d45c29 编写于 作者: N Nicolargo

Expose glances config file when running in docker #868

上级 6329ae65
......@@ -21,4 +21,4 @@ EXPOSE 61209
EXPOSE 61208
# Define default command.
CMD python -m glances $GLANCES_OPT
CMD python -m glances -C /glances/conf/glances.conf $GLANCES_OPT
......@@ -144,6 +144,22 @@ Run the container in console mode:
docker run -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host -it docker.io/nicolargo/glances
Additionally, If you want to use your own glances.conf file, you can create your
own Dockerfile:
.. code-block:: console
FROM nicolargo/glances
COPY glances.conf /glances/conf/glances.conf
CMD python -m glances -C /glances/conf/glances.conf $GLANCES_OPT
Alternatively, you can specify something along the same lines with docker run options:
.. code-block:: console
docker run -v ./glances.conf:/glances/conf/glances.conf -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host -it docker.io/nicolargo/glances
Where ./glances.conf is a local directory containing your glances.conf file.
GNU/Linux
---------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册