Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to custom docker runtime #735

Open
agusmakmun opened this issue Sep 21, 2022 · 0 comments
Open

Unable to custom docker runtime #735

agusmakmun opened this issue Sep 21, 2022 · 0 comments

Comments

@agusmakmun
Copy link

agusmakmun commented Sep 21, 2022

Long story short

  • Expected behaviour: Should able to set the custom docker runtime.
  • Actual behaviour: Unable to set custom docker runtime.

How to reproduce

First of all, I'm trying to set the custom runtime by using docker itself, and it works as expected.
Then also, previously I tried to use docker.APIClient to set the custom runtime, and it works as expected.
But, now we move into asyncio, so that's why we use this aiodocker, but we have a problem to set the custom runtime.

# 1st terminal
docker --debug info | grep Runtimes
  Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc

docker run -it --runtime=io.containerd.runc.v2 debian

# 2nd terminal
docker ps
docker inspect <container_id>

# find "Runtime", and it set to "io.containerd.runc.v2"

Then using aiodocker:

container_config = {
    "Hostname": "debian-92vwkfdz",
    "Domainname": None,
    "ExposedPorts": {
        "22/tcp": {},
        "80/tcp": {},
        "443/tcp": {},
        "8000/tcp": {},
        "8080/tcp": {},
    },
    "User": None,
    "Tty": True,
    "OpenStdin": True,
    "StdinOnce": False,
    "AttachStdin": False,
    "AttachStdout": False,
    "AttachStderr": False,
    "Env": ["SERVICE_NAME=debian-92vwkfdz", "SERVICE_TAGS=debian"],
    "Cmd": None,
    "Image": "debian",
    "Volumes": None,
    "NetworkDisabled": False,
    "Entrypoint": None,
    "WorkingDir": None,
    "HostConfig": {
        "NetworkMode": "92vwkfdz",
        "PublishAllPorts": True,
        "IpcMode": "private",
    },
    "NetworkingConfig": None,
    "MacAddress": None,
    "Labels": {
        "id": "92vwkfdz",
        "traefik.enable": "true",
        ...
    },
    "StopSignal": None,
    "StopTimeout": None,
    "Runtime": "io.containerd.runc.v2",
}

client = await aiodocker.Docker(url=base_url, connector=connector)
machine = await client.containers.create(
    config=container_config, name="debian"
)

Then, after that some how the "Runtime" unable to set to "io.containerd.runc.v2" when we do inspect to it container.
To note that, previously we able to set the runtime when it docker client is client = docker.APIClient

Your environment

  • macOS Big Sur
  • Python 3.8.14
  • django==3.2.15
  • docker==5.0.3
  • aiodocker==0.21.0
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

No branches or pull requests

1 participant