You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
testcontainers.core.image.DockerImage has a constructor arg path with the following docs:
path – Path to the Dockerfile to build the image
But actually this doesn't seem to be true. It's rather the context, the path to the directory to build in and the dockerfile itself must be named Dockerfile. Especially for testing this is very unhandy. I often have several dockerfiles in the same directory. I'd expect bein able to pass a context and the actualpath to the dockerfile, like
Err... make tests in the devcontainer leaves me with 32 failed, 42 passed, 3 warnings in 61.63s
/edit: locally they look better but you have to poetry install -E registry - only 26 tests fails then --- there should really be a readme for contributors
i think that makes sense if you are on windows. its on my list to find a piece of terraform code that creates a windows VM in aws, so i can develop against windows, lots of challenges there. (cc @kiview)
It's totally fine to docker build -t whatevs -f some/sub/dir/my.Dockerfile . - yet the code seems to require the dockerfile to be top-level in the path, which is treated as context.
/edit: okay dockerfile can be a path within path ... the naming seems quite unfortunate
Activity
alexanderankin commentedon Jun 20, 2024
so, that's a mistake - I'm pretty busy with my job these days but will review patches, seems like something to fix (and add re: build/args).
i might even argue for calling adding build/args a fix, as it makes our api more congruent with the docker api.
black-snow commentedon Jun 21, 2024
I'll take a look at it.
black-snow commentedon Jun 21, 2024
Err...
make testsin the devcontainer leaves me with 32 failed, 42 passed, 3 warnings in 61.63s/edit: locally they look better but you have to
poetry install -E registry- only 26 tests fails then --- there should really be a readme for contributorsalexanderankin commentedon Jun 21, 2024
i think that makes sense if you are on windows. its on my list to find a piece of terraform code that creates a windows VM in aws, so i can develop against windows, lots of challenges there. (cc @kiview)
alexanderankin commentedon Jun 21, 2024
@black-snow you should be
poetry install --with dev --all-extrasif you are trying to run the full test suite (likepytest -s)black-snow commentedon Jun 21, 2024
@alexanderankin I'm on Ubuntu 24 right now. Even with all the extras 30 tests still fail.
black-snow commentedon Jun 21, 2024
From https://docker-py.readthedocs.io/en/stable/images.html#docker.models.images.ImageCollection.build it's not very clear what exactly the
pathis either. Looking at the code I'm pretty sure this is not what I expect. So I might have to redirect this to docker-py first.It's totally fine to
docker build -t whatevs -f some/sub/dir/my.Dockerfile .- yet the code seems to require the dockerfile to be top-level in thepath, which is treated as context./edit: okay
dockerfilecan be a path withinpath... the naming seems quite unfortunatefeat(core): allow custom dockerfile path for image build and bypassin…
alexanderankin commentedon Jun 23, 2024
@black-snow do you have your docker socket visible to your user? e.g. i think by default the docker socket has these permissions:
and then you need to be in the docker group:
black-snow commentedon Jun 27, 2024
@alexanderankin I have Docker Desktop on this machine an it keeps the sockets in
~/docker/desktop/docker.sock.Never bothered to check on this machine - actually I'm not in the
dockergroup here. But apparently this isn't necessary with recent Docker Desktop./edit
/var/run/docker.sockseems to be baked in to some placesalexanderankin commentedon Jun 28, 2024
i opened #621 so that I can find this discussion easier later, never heard of docker desktop on linux before
chore(main): release testcontainers 4.7.0 (#613)