Skip to content

Commit fba7730

Browse files
author
Gauvain Pocentek
committed
Add a contributed Dockerfile
Thanks oupala! Closes #295
1 parent 9dd410f commit fba7730

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

contrib/docker/Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM python:slim
2+
3+
# Install python-gitlab
4+
RUN pip install --upgrade python-gitlab
5+
6+
# Copy sample configuration file
7+
COPY python-gitlab.cfg /
8+
9+
# Define the entrypoint that enable a configuration file
10+
ENTRYPOINT ["gitlab", "--config-file", "/python-gitlab.cfg"]

contrib/docker/README.rst

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
python-gitlab docker image
2+
==========================
3+
4+
Dockerfile contributed by *oupala*:
5+
https://github.com/python-gitlab/python-gitlab/issues/295
6+
7+
How to build
8+
------------
9+
10+
``docker build -t me/python-gitlab:VERSION .``
11+
12+
How to use
13+
----------
14+
15+
``docker run -it -v /path/to/python-gitlab.cfg:/python-gitlab.cfg python-gitlab <command> ...``
16+
17+
To make things easier you can create a shell alias:
18+
19+
``alias gitlab='docker run --rm -it -v /path/to/python-gitlab.cfg:/python-gitlab.cfg python-gitlab``

contrib/docker/python-gitlab.cfg

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[global]
2+
default = somewhere
3+
ssl_verify = true
4+
timeout = 5
5+
api_version = 3
6+
7+
[somewhere]
8+
url = https://some.whe.re
9+
private_token = vTbFeqJYCY3sibBP7BZM
10+
api_version = 4
11+
12+
[elsewhere]
13+
url = http://else.whe.re:8080
14+
private_token = CkqsjqcQSFH5FQKDccu4
15+
timeout = 1

0 commit comments

Comments
 (0)