Skip to content

fix(docker): use docker image with current sources - #605

Merged
gpocentek merged 1 commit into
masterfrom
fix/docker
Oct 15, 2018
Merged

fix(docker): use docker image with current sources#605
gpocentek merged 1 commit into
masterfrom
fix/docker

Conversation

@max-wittig

@max-wittig max-wittig commented Oct 5, 2018

Copy link
Copy Markdown
Member

Fixes #602

Comment thread Dockerfile Outdated

WORKDIR /opt/python-gitlab
COPY --from=build /opt/python-gitlab/dist dist/
RUN pip install $(find dist -name *.whl)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also delete the wheel here, and build the docker image with --squash, to save a tiny bit of extra space.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--squash still seems to be experimental, but otherwise good idea!

Comment thread Dockerfile Outdated
@@ -0,0 +1,15 @@
FROM python:alpine AS build

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we pin to a Python version?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better. Maybe 3.8 will break something. I don't think so, but best practice.

Comment thread README.rst Outdated
How to use
----------

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ghost =/python-gitlab.cfg ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied that from contrib/docker/README.rst and just glanced over it. Nice find.

@max-wittig

Copy link
Copy Markdown
Member Author

@gpocentek Feel free to merge, if you approve 😃

@max-wittig max-wittig assigned max-wittig and gpocentek and unassigned max-wittig Oct 15, 2018
@gpocentek
gpocentek merged commit c9f7986 into master Oct 15, 2018
@gpocentek
gpocentek deleted the fix/docker branch June 20, 2019 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants