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

The same postgis container does not work in colima, but works in docker-desktop #1006

Open
1 of 5 tasks
alphavector opened this issue Mar 23, 2024 · 1 comment
Open
1 of 5 tasks

Comments

@alphavector
Copy link

alphavector commented Mar 23, 2024

Description

It's all in the title

Version

colima version HEAD-9b0809d
git commit: 9b0809d

runtime: docker
arch: aarch64
client: v26.0.0
server: v24.0.9
limactl version 0.21.0
qemu-img version 8.2.1
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers

Operating System

  • macOS Intel <= 13 (Ventura)
  • macOS Intel >= 14 (Sonoma)
  • Apple Silicon <= 13 (Ventura)
  • Apple Silicon >= 14 (Sonoma)
  • Linux

Output of colima status

INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] socket: unix:///Users/marat/.colima/default/docker.sock

Reproduction Steps

  1. Verify with the docker context list command that colima is being used
  2. Run the container with the database docker run --rm --name postgis -p 5432:5432 -e POSTGRES_PASSWORD=test -d imresamu/postgis:14-3.1.11-alpine3.18.
  3. Save the client code in the test.py file
import asyncio
from aiopg.sa import create_engine
import sqlalchemy as sa


async def main():
    async with create_engine('postgresql://postgres:test@localhost:5432/postgres') as engine:

        async with engine.acquire() as conn:
            res = await (await conn.execute(sa.select(1))).scalar()
        print(res)


asyncio.run(main())
  1. Install the required version of python and dependencies
> python -V
Python 3.12.0
> pip freeze
aiopg==1.5.0a1
async-timeout==4.0.3
greenlet==3.0.3
psycopg2==2.9.9
psycopg2-binary==2.9.9
SQLAlchemy==2.0.28
typing_extensions==4.10.0
  1. Run python -m test
  2. Get TimeoutError.
  3. Stop colima, start docker-desktop, verify with the docker context list command that docker is in use
  4. Repeat steps 2-5
  5. See that everything works and outputs 1.

Expected behaviour

Client outputs 1

Additional context

No response

@alphavector alphavector changed the title The same postgis container does not work in colima, but works in docker-desktop The same postgis container does not work in colima, but works in docker-desktop Mar 23, 2024
@eurekin
Copy link

eurekin commented Apr 9, 2024

It's probably caused by missing async io kernel implementations in aarch64: try the same with x86_64 - that usually does for this case

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

2 participants