Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc9f7986

Browse files
authored
Merge pull request#605 from python-gitlab/fix/docker
fix(docker): use docker image with current sources
2 parents156a21e +06e8ca8 commitc9f7986

File tree

6 files changed

+43
-31
lines changed

6 files changed

+43
-31
lines changed

‎.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
venv/
2+
dist/
3+
build/
4+
*.egg-info
5+
.github/

‎Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM python:3.7-alpine AS build
2+
3+
WORKDIR /opt/python-gitlab
4+
COPY . .
5+
RUN python setup.py bdist_wheel
6+
7+
FROM python:3.7-alpine
8+
9+
WORKDIR /opt/python-gitlab
10+
COPY --from=build /opt/python-gitlab/dist dist/
11+
RUN pip install $(find dist -name *.whl) && \
12+
rm -rf dist/
13+
COPY docker-entrypoint.sh /usr/local/bin/
14+
15+
ENTRYPOINT ["docker-entrypoint.sh"]
16+
CMD ["--version"]

‎README.rst

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ It supports the v4 API of GitLab, and provides a CLI tool (``gitlab``).
2020
Maintainer(s) wanted
2121
====================
2222

23-
We are looking forneww maintainer(s) for this project. See
23+
We are looking fornew maintainer(s) for this project. See
2424
https://github.com/python-gitlab/python-gitlab/issues/596.
2525

2626
Installation
@@ -41,6 +41,27 @@ Install with pip
4141
4242
pip install python-gitlab
4343
44+
45+
Using the python-gitlab docker image
46+
====================================
47+
48+
How to build
49+
------------
50+
51+
``docker build -t python-gitlab:TAG .``
52+
53+
How to use
54+
----------
55+
56+
``docker run -it --rm -e GITLAB_PRIVATE_TOKEN=<your token> -v /path/to/python-gitlab.cfg:/python-gitlab.cfg python-gitlab <command> ...``
57+
58+
To change the GitLab URL, use `-e GITLAB_URL=<your url>`
59+
60+
61+
Bring your own config file:
62+
``docker run -it --rm -v /path/to/python-gitlab.cfg:/python-gitlab.cfg -e GITLAB_CFG=/python-gitlab.cfg python-gitlab <command> ...``
63+
64+
4465
Bug reports
4566
===========
4667

‎contrib/docker/Dockerfile

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

‎contrib/docker/README.rst

Lines changed: 0 additions & 20 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp