profile
viewpoint
Joffrey F shin- @BrandlessInc San Francisco, CA http://joffrey.eu

docker/docker-py 4599

A Python library for the Docker Engine API

jazzband/django-defender 379

A simple super fast django reusable app that blocks people from brute forcing login attempts

shin-/docker-py.orig 6

An API client for docker written in Python

3on/buzzode 3

Communautary bittorrent web client based uppon transmission, in node.js

3on/foc-api 3

the most important part of the File Over Cloud project

3on/httppp 3

y another http client wrapper for node.js

3on/synceries 2

iPhone checklist app using google spreadsheets (school project)

shin-/crea 2

Connected Roleplaying Enhancer Application

shin-/buzzode 1

Communautary bittorrent web client based uppon transmission, in node.js

push eventspellfinder/spells

Joffrey F

commit sha 3855e1256f7267e575dc6f87dd5e9402ae2d6c2e

New version of node image has yarn pre-installed

view details

Joffrey F

commit sha 9efd86560c654ae2dab75354bfc806084fb5445d

Upgrade dependencies

view details

Joffrey F

commit sha 0b2d215b201b59829469bf26dda28f15ca4285a6

Update spell data

view details

Joffrey F

commit sha dd47715cede943cc52adcb8f3fe45b38d1a8988c

Fix typo in traditions dropdown

view details

Joffrey F

commit sha d55f779a0119d2aa8845a589dbaec6e69cfcfabe

Version bump

view details

Joffrey F

commit sha edea98b23c35f016b340316d153535453a2e78c2

indentation fix

view details

push time in 10 days

push eventspellfinder/spells

dependabot[bot]

commit sha 06467f92327297ab1256ca1f859581f13f000f2b

Bump eslint-utils from 1.4.0 to 1.4.3 Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.4.0 to 1.4.3. - [Release notes](https://github.com/mysticatea/eslint-utils/releases) - [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.4.0...v1.4.3) Signed-off-by: dependabot[bot] <support@github.com>

view details

Joffrey F

commit sha 83b73f6c10d0c3a53c5bd33cb13e97f5c841a8fd

Merge pull request #4 from spellfinder/dependabot/npm_and_yarn/eslint-utils-1.4.3 Bump eslint-utils from 1.4.0 to 1.4.3

view details

push time in 2 months

PR merged spellfinder/spells

Bump eslint-utils from 1.4.0 to 1.4.3 dependencies

Bumps eslint-utils from 1.4.0 to 1.4.3. <details> <summary>Commits</summary>

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+8 -8

0 comment

1 changed file

dependabot[bot]

pr closed time in 2 months

push eventspellfinder/spells

dependabot[bot]

commit sha 30f691b80ed543784f837faad8f9e2dd65692817

Bump handlebars from 4.1.2 to 4.5.3 Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.5.3. - [Release notes](https://github.com/wycats/handlebars.js/releases) - [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md) - [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.2...v4.5.3) Signed-off-by: dependabot[bot] <support@github.com>

view details

Joffrey F

commit sha 0a86cfff825457ede2d50a3306b962a10f3e544e

Merge pull request #5 from spellfinder/dependabot/npm_and_yarn/handlebars-4.5.3 Bump handlebars from 4.1.2 to 4.5.3

view details

push time in 2 months

PR merged spellfinder/spells

Bump handlebars from 4.1.2 to 4.5.3 dependencies

Bumps handlebars from 4.1.2 to 4.5.3. <details> <summary>Changelog</summary>

Sourced from handlebars's changelog.

v4.5.3 - November 18th, 2019

Bugfixes:

  • fix: add "no-prototype-builtins" eslint-rule and fix all occurences - f7f05d7
  • fix: add more properties required to be enumerable - 1988878

Chores / Build:

  • fix: use !== 0 instead of != 0 - c02b05f
  • add chai and dirty-chai and sinon, for cleaner test-assertions and spies, deprecate old assertion-methods - 93e284e, 886ba86, 0817dad, 93516a0

Security:

  • The properties __proto__, __defineGetter__, __defineSetter__ and __lookupGetter__ have been added to the list of "properties that must be enumerable". If a property by that name is found and not enumerable on its parent, it will silently evaluate to undefined. This is done in both the compiled template and the "lookup"-helper. This will prevent new Remote-Code-Execution exploits that have been published recently.

Compatibility notes:

  • Due to the security-fixes. The semantics of the templates using __proto__, __defineGetter__, __defineSetter__ and __lookupGetter__ in the respect that those expression now return undefined rather than their actual value from the proto.
  • The semantics have not changed in cases where the properties are enumerable, as in:
{
  __proto__: 'some string'
}
  • The change may be breaking in that respect, but we still only increase the patch-version, because the incompatible use-cases are not intended, undocumented and far less important than fixing Remote-Code-Execution exploits on existing systems.

Commits

v4.5.2 - November 13th, 2019

Bugfixes

  • fix: use String(field) in lookup when checking for "constructor" - d541378
  • test: add fluent API for testing Handlebars - c2ac79c

Compatibility notes:

  • no incompatibility are to be expected </tr></table> ... (truncated) </details> <details> <summary>Commits</summary>
  • c819c8b v4.5.3
  • 827c9d0 Update release notes
  • f7f05d7 fix: add "no-prototype-builtins" eslint-rule and fix all occurences
  • 1988878 fix: add more properties required to be enumerable
  • 886ba86 test/chore: add chai/expect and sinon to "runtime"-environment
  • 0817dad test: add sinon as global variable to eslint in the specs
  • 93516a0 test: add sinon.js for spies, deprecate current assertions
  • 93e284e chore: add chai and dirty-chai for better test assertions
  • c02b05f fix: use !== 0 instead of != 0
  • 8de121d v4.5.2
  • Additional commits viewable in compare view </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+13 -8

0 comment

1 changed file

dependabot[bot]

pr closed time in 2 months

push eventshin-/advent-of-code-2019

Joffrey F

commit sha 15ef94fab1e143952cc3ea29ae7778ad9b82278f

Partial day 6

view details

push time in 3 months

push eventshin-/advent-of-code-2019

Joffrey F

commit sha 9277bb952267057b451870e032a7deb987b47d89

Day 5

view details

push time in 3 months

push eventshin-/advent-of-code-2019

Joffrey F

commit sha b11927dc939cb6c78707b898804cb78d62b0d7e2

Day 4

view details

push time in 3 months

PublicEvent

issue closeddocker/docker-py

"swarm service inspect" description in https://docker-py.readthedocs.io/en/1.10.0/api/

the description of "swarm service inspect" seems strange in: https://docker-py.readthedocs.io/en/1.10.0/api/

inspect_service
Create a service, similar to the docker service create command. See the services documentation for details.

Thanks

closed time in 3 months

hdlbq

issue commentdocker/docker-py

"swarm service inspect" description in https://docker-py.readthedocs.io/en/1.10.0/api/

Thanks for the report. That's tied to the version of the code at time of release, which for 1.10.0 was 3 years ago, so we won't do anything to fix this.

hdlbq

comment created time in 3 months

issue closeddocker/docker-py

requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

Here is the full traceback:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 354, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.6/http/client.py", line 1254, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1300, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1249, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1036, in _send_output
    self.send(msg)
  File "/usr/lib/python3.6/http/client.py", line 974, in send
    self.connect()
  File "/usr/local/lib/python3.6/dist-packages/docker/transport/unixconn.py", line 43, in connect
    sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.6/dist-packages/urllib3/util/retry.py", line 368, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.6/dist-packages/urllib3/packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py", line 354, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.6/http/client.py", line 1254, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1300, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1249, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1036, in _send_output
    self.send(msg)
  File "/usr/lib/python3.6/http/client.py", line 974, in send
    self.connect()
  File "/usr/local/lib/python3.6/dist-packages/docker/transport/unixconn.py", line 43, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 78, in <module>
    main()
  File "main.py", line 32, in main
    docker_client.login(username=docker_username, password=docker_password)
  File "/usr/local/lib/python3.6/dist-packages/docker/client.py", line 183, in login
    return self.api.login(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/docker/api/daemon.py", line 149, in login
    response = self._post_json(self._url('/auth'), data=req_data)
  File "/usr/local/lib/python3.6/dist-packages/docker/api/client.py", line 289, in _post_json
    return self._post(url, data=json.dumps(data2), **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/docker/api/client.py", line 226, in _post
    return self.post(url, **self._set_request_timeout(kwargs))
  File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 581, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

So I am trying to log into docker hub using this package. The python script running this is running in a docker container. Below is the Dockerfile:

# Base image with docker and python3.6 installed
FROM mattgleich/python-and-docker

# Image metadata
LABEL maintainer="matthewgleich@gmail.com"
LABEL description="Automatically build images anywhere that docker runs"

# Installing Git
RUN apt-get update
RUN apt-get -qq -y install git

# Installing requirements
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt 
RUN export GIT_PYTHON_REFRESH=quiet

COPY /src /src
WORKDIR /src
RUN rm -rf repos

# Fixing some stuff with docker
RUN eval "$(docker-machine env default)"

CMD [ "python3", "main.py" ]

The docker hub password is stored in a folder called configs that is then put into the container using a volume. Below is the error that I get when I start the container with docker compose:

version: "3"

services:
    auto-build-images:
        container_name: auto-build-images
        build: .
        network_mode: "host"
        volumes:
            - ~/auto-build-images-config:/src/config

As far as the script goes, below is a link to the GitHub repo for the project: https://github.com/Matt-Gleich/Auto-Build-Images-Anywhere

closed time in 3 months

Matt-Gleich

issue commentdocker/docker-py

requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

RUN eval "$(docker-machine env default)" will not persist these environment values at runtime. You'll need a startup script.

I'm going to close this as it's not related to the SDK.

Matt-Gleich

comment created time in 3 months

issue commentdocker/docker-py

Promoting/Demoting Docker Swarm Node

You should be able to trigger an update operation to set the role from manager to worker with:

  • client.update_node if you're using the low-level API (APIClient).
  • client.nodes.get(node_id).update if you're using the high-level API (DockerClient).
jaredvacanti

comment created time in 3 months

issue commentdocker/docker-py

Internal server error ("Device is Busy") for docker client images.remove()

That's an error at the server level (in the Docker daemon) - the SDK is behaving appropriately here by raising.

jjbuck

comment created time in 4 months

issue closeddocker/docker-py

Client.containers.list(all=True) fails nondeterministically if some container is being removed in parallel

We have encountered a following issue in following scenario:

Scenario:

  • Have docker on a node
  • Have docker-service with one replica
  • Scale service down to zero replicas
  • List containers in a loop (waiting for the container of a service to disappear)

Expected results: Eventually created list of the containers has one less element.

Actual results:

Nondeterministically the code fails with following backtrace:

...
07:40:01    File ..., line 108, in getAllContainerNames
07:40:01      return [container.name for client in self._swarm.clients for container in client.containers.list(all=True)]
07:40:01    File "/tmp/tmp.xrnVzrxn9J/lib/python2.7/site-packages/docker/models/containers.py", line 943, in list
07:40:01      containers.append(self.get(r['Id']))
07:40:01    File "/tmp/tmp.xrnVzrxn9J/lib/python2.7/site-packages/docker/models/containers.py", line 880, in get
07:40:01      resp = self.client.api.inspect_container(container_id)
07:40:01    File "/tmp/tmp.xrnVzrxn9J/lib/python2.7/site-packages/docker/utils/decorators.py", line 19, in wrapped
07:40:01      return f(self, resource_id, *args, **kwargs)
07:40:01    File "/tmp/tmp.xrnVzrxn9J/lib/python2.7/site-packages/docker/api/container.py", line 756, in inspect_container
07:40:01      self._get(self._url("/containers/{0}/json", container)), True
07:40:01    File "/tmp/tmp.xrnVzrxn9J/lib/python2.7/site-packages/docker/api/client.py", line 267, in _result
07:40:01      self._raise_for_status(response)
07:40:01    File "/tmp/tmp.xrnVzrxn9J/lib/python2.7/site-packages/docker/api/client.py", line 263, in _raise_for_status
07:40:01      raise create_api_error_from_http_exception(e)
07:40:01    File "/tmp/tmp.xrnVzrxn9J/lib/python2.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
07:40:01      raise cls(e, response=response, explanation=explanation)
07:40:01  NotFound: 404 Client Error: Not Found ("No such container: 3701121bed79b3925404c76b5f66a89c0d20fd86eab541fdd85690cecd07aafa")

Reproduction: I was able to reproduce this issue with a minimalisic test:

  • In first terminal run
import docker
cli = docker.DockerClient()
while True:
   a = cli.containers.list(all=True)
  • In second terminal run: for i in `seq 10`; do docker rm -f `docker run -d busybox tail -F /dev/null`; done (in my environment this issue occurs quickly and 10 loop iterations are enough) Output obtained:
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/home/bzak/persistentVenv/local/lib/python2.7/site-packages/docker/models/containers.py", line 943, in list
    containers.append(self.get(r['Id']))
  File "/home/bzak/persistentVenv/local/lib/python2.7/site-packages/docker/models/containers.py", line 880, in get
    resp = self.client.api.inspect_container(container_id)
  File "/home/bzak/persistentVenv/local/lib/python2.7/site-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/home/bzak/persistentVenv/local/lib/python2.7/site-packages/docker/api/container.py", line 756, in inspect_container
    self._get(self._url("/containers/{0}/json", container)), True
  File "/home/bzak/persistentVenv/local/lib/python2.7/site-packages/docker/api/client.py", line 267, in _result
    self._raise_for_status(response)
  File "/home/bzak/persistentVenv/local/lib/python2.7/site-packages/docker/api/client.py", line 263, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/home/bzak/persistentVenv/local/lib/python2.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.NotFound: 404 Client Error: Not Found ("No such container: edf87eb0d1906fd2c567f62846922e3b537552fe28f689d761baece250b21145")

Suspicions: I believe this is a race condition in which docker-py tries to list containers first and then inspect them. Since those commands are "non-atomic" the list can contain container that is removed immediately thereafter and tries to inspect a non-existing container.

Additional information: Python: Python 2.7.5 Docker-py: 4.0.2 Docker:

Client:
 Version:           18.09.3
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        774a1f4
 Built:             Thu Feb 28 06:33:21 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.3
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       774a1f4
  Built:            Thu Feb 28 06:02:24 2019
  OS/Arch:          linux/amd64
  Experimental:     false

closed time in 4 months

bzak9LD

issue commentdocker/docker-py

Client.containers.list(all=True) fails nondeterministically if some container is being removed in parallel

Use sparse=True or ignore_removed=True: https://docker-py.readthedocs.io/en/stable/containers.html#docker.models.containers.ContainerCollection.list

bzak9LD

comment created time in 4 months

pull request commentdocker/docker-py

Bump pytest to 4.3.1

@shin- I see there's one (unresolved) issue on the 4.1.0 milestone; #2355 - is that a blocker for 4.1.0, or was it just put on the milestone "tentatively" ?

Not a blocker, more of a wish 😅

To check what the next tag should be (4.1.0 or 4.0.3); looking through the changes, most changes are fixes;

  • diff 4.0.2...master (may be deceiving, as we're comparing between branches, and some commits may not match)
  • raw diff: https://github.com/docker/docker-py/compare/4.0.2..master

I think (may want to double-check) that #2333 is the only feature that was added; if that's indeed a feature, then it should be 4.1.0

@ulyssessouza @shin- ^^

I'd go ahead and release 4.1.0 without #2355 (which we can move into the next milestone)

kolyshkin

comment created time in 5 months

pull request commentdocker/docker-py

Bump pytest to 4.3.1

@kolyshkin I'm going to be offline for a couple of weeks starting tomorrow, so if @ulyssessouza or @rumpl can take the lead on that that'd be ideal! Thanks guys :)

kolyshkin

comment created time in 5 months

issue commentdocker/docker-py

Not compatible with pywin32 version 225

Versions are already pinned on our end: https://github.com/docker/docker-py/blob/master/setup.py#L29-L30

hogarthj

comment created time in 5 months

more