Skip to content

Commit 80754a1

Browse files
nejchJohnVillalovos
authored andcommitted
feat(docker): remove custom entrypoint from image
This is no longer needed as all of the configuration is handled by the CLI and can be passed as arguments.
1 parent ca58008 commit 80754a1

File tree

3 files changed

+26
-37
lines changed

3 files changed

+26
-37
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ COPY --from=build /opt/python-gitlab/dist dist/
1111
RUN pip install PyYaml
1212
RUN pip install $(find dist -name *.whl) && \
1313
rm -rf dist/
14-
COPY docker-entrypoint.sh /usr/local/bin/
1514

16-
ENTRYPOINT ["docker-entrypoint.sh"]
15+
ENTRYPOINT ["gitlab"]
1716
CMD ["--version"]

README.rst

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,29 +43,41 @@ Install with pip
4343
4444
pip install python-gitlab
4545
46+
Using the docker image
47+
======================
4648

47-
Using the python-gitlab docker image
48-
====================================
49+
You can run the Docker image directly from the GitLab registry:
4950

50-
How to build
51-
------------
51+
.. code-block:: console
52+
53+
$ docker run -it --rm registry.gitlab.com/python-gitlab/python-gitlab:latest <command> ...
54+
55+
For example, to get a project on GitLab.com (without authentication):
56+
57+
.. code-block:: console
5258
53-
``docker build -t python-gitlab:TAG .``
59+
$ docker run -it --rm registry.gitlab.com/python-gitlab/python-gitlab:latest project get --id gitlab-org/gitlab
5460
55-
How to use
56-
----------
61+
You can also mount your own config file:
5762

58-
``docker run -it --rm -e GITLAB_PRIVATE_TOKEN=<your token> -v /path/to/python-gitlab.cfg:/python-gitlab.cfg python-gitlab <command> ...``
63+
.. code-block:: console
64+
65+
$ docker run -it --rm -v /path/to/python-gitlab.cfg:/etc/python-gitlab.cfg registry.gitlab.com/python-gitlab/python-gitlab:latest <command> ...
66+
67+
Building the image
68+
------------------
5969

60-
or run it directly from the upstream image:
70+
To build your own image from this repository, run:
6171

62-
``docker run -it --rm -e GITLAB_PRIVATE_TOKEN=<your token> -v /path/to/python-gitlab.cfg:/python-gitlab.cfg registry.gitlab.com/python-gitlab/python-gitlab:latest <command> ...``
72+
.. code-block:: console
73+
74+
$ docker build -t python-gitlab:latest .
6375
64-
To change the GitLab URL, use `-e GITLAB_URL=<your url>`
76+
Run your own image:
6577

66-
Bring your own config file:
67-
``docker run -it --rm -v /path/to/python-gitlab.cfg:/python-gitlab.cfg -e GITLAB_CFG=/python-gitlab.cfg python-gitlab <command> ...``
78+
.. code-block:: console
6879
80+
$ docker run -it --rm -v python-gitlab:latest <command> ...
6981
7082
Bug reports
7183
===========

docker-entrypoint.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy