Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(docker): use docker image with current sources
  • Loading branch information
max-wittig committed Oct 9, 2018
1 parent 3a8b1a0 commit 06e8ca8
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 31 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
@@ -0,0 +1,5 @@
venv/
dist/
build/
*.egg-info
.github/
16 changes: 16 additions & 0 deletions Dockerfile
@@ -0,0 +1,16 @@
FROM python:3.7-alpine AS build

WORKDIR /opt/python-gitlab
COPY . .
RUN python setup.py bdist_wheel

FROM python:3.7-alpine

WORKDIR /opt/python-gitlab
COPY --from=build /opt/python-gitlab/dist dist/
RUN pip install $(find dist -name *.whl) && \
rm -rf dist/
COPY docker-entrypoint.sh /usr/local/bin/

ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["--version"]
23 changes: 22 additions & 1 deletion README.rst
Expand Up @@ -20,7 +20,7 @@ It supports the v4 API of GitLab, and provides a CLI tool (``gitlab``).
Maintainer(s) wanted
====================

We are looking for neww maintainer(s) for this project. See
We are looking for new maintainer(s) for this project. See
https://github.com/python-gitlab/python-gitlab/issues/596.

Installation
Expand All @@ -41,6 +41,27 @@ Install with pip
pip install python-gitlab
Using the python-gitlab docker image
====================================

How to build
------------

``docker build -t python-gitlab:TAG .``

How to use
----------

``docker run -it --rm -e GITLAB_PRIVATE_TOKEN=<your token> -v /path/to/python-gitlab.cfg:/python-gitlab.cfg python-gitlab <command> ...``

To change the GitLab URL, use `-e GITLAB_URL=<your url>`


Bring your own config file:
``docker run -it --rm -v /path/to/python-gitlab.cfg:/python-gitlab.cfg -e GITLAB_CFG=/python-gitlab.cfg python-gitlab <command> ...``


Bug reports
===========

Expand Down
10 changes: 0 additions & 10 deletions contrib/docker/Dockerfile

This file was deleted.

20 changes: 0 additions & 20 deletions contrib/docker/README.rst

This file was deleted.

File renamed without changes.

0 comments on commit 06e8ca8

Please sign in to comment.