Commit 6d4bffb5 authored by eddybl's avatar eddybl Committed by Nejc Habjan
Browse files

docs: Note how to use the Docker image from within GitLab CI

Ref: #2823
parent d5b5fb00
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -112,6 +112,23 @@ You can also mount your own config file:

   $ docker run -it --rm -v /path/to/python-gitlab.cfg:/etc/python-gitlab.cfg registry.gitlab.com/python-gitlab/python-gitlab:latest <command> ...

Usage inside GitLab CI
~~~~~~~~~~~~~~~~~~~~~~

If you want to use the Docker image directly inside your GitLab CI as an `image`, you will need to override
the `entrypoint`, `as noted in the official GitLab documentation <https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#override-the-entrypoint-of-an-image>`__:

.. code-block:: yaml

   Job Name:
      image:
         name: registry.gitlab.com/python-gitlab/python-gitlab:latest
         entrypoint: [""]
      before_script:
         gitlab --version
      script:
         gitlab <command>

Building the image
~~~~~~~~~~~~~~~~~~