docker / docker/docker-py

Provide a testable Dockerfile or image to run integration tests in Moby CI

Open
#2,310 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

First; is there a Dockerfile in this repository that would be suitable to run the integration tests? And/or is such an image pushed to docker hub somewhere (or could it be?)

Basically; we run the docker-py tests on moby pull requests, but that currently means we also build docker-py, and have to install all its dependencies in the Dockerfile / dev-image (also see https://github.com/moby/moby/pull/38526)

Given that;

  • dependencies may change
  • perhaps we want to run CI against multiple versions (different docker-py releases)
  • nobody thinks of updating the docker-py in the tests at https://github.com/moby/moby ( unless something breaks), and when updating, it's hoping that it's just "change the version", and no dependency changes

I think all that the docker-py integration tests need is:

  • a running daemon
  • access to the daemon (docker-socket? or does it work better over http?)
  • a docker-cli in the test-image (?)

If so, we could just

  • pull a pre-built version of that image
    • or build a Dockerfile from the docker-py repo
  • start a daemon (built from the PR to test against those changes)
  • run the image with -v /var/run/docker.sock:/var/run/docker.sock
  • and run the tests (default entrypoint of the image, or e.g. make test)

Correct?

My goal is to save some time building the Moby Dockerfile, but also to decouple the projects (i.e. don't require knowledge about what dependencies are needed, and how to build/install docker-py)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Moby PR linked in the issue, the existing Moby Dockerfile/dev-image, and the docker-py integration tests. Establish whether the tests require a daemon, Docker socket or HTTP access, and a docker-cli; done means a documented Dockerfile or image that Moby CI can use without rebuilding docker-py and its dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
ci-cd, devops, infrastructure, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.