Comments (4)
The problem is that the server responds with lot less information than an inspect for each container.
So everyone ends up doing an inspect anyway.
Saving this state in the object is an option but it can be tricky in some scenarios, because it could be easily outdated/outofsync.
But like someone said, returning json instead of instances in the list endpoints is also a bit weird since we have instances.
That being said right now there's a consistency problem, containers vs images, and this hurts my eyes more than everything.
I would like a solution where we didn't loose this information but we also had instances.
from dockerode.
inspect is very very different from list I don't think it makes sense storing either of these things in the instance but ideally we could allow querying them.
My current (and I think this is sorta lame) idea would be to do something like this:
var imageList;
var image = docker.image(imageList[0]); // this knows how to look for id or Id
from dockerode.
Images inspect and list are very different.
But the containers case is a bit different from images ( http://docs.docker.io/en/latest/api/docker_remote_api_v1.8/#list-containers and http://docs.docker.io/en/latest/api/docker_remote_api_v1.8/#inspect-a-container ) which is a bigger problem.
Only now I realised there is information that is in the container list and not in the inspect (SizeRw and SizeRootFs)
This was a bad decision, I think I will rollback this change back to returning JSON. (dockerode was using JSON in v0.x)
from dockerode.
Yeah I'm going to rollback it.
Today I learned an important lesson as a maintainer and filtering people requests :)
I also agree with you that is kinda of lame, lets just return JSON and let people do whatever they want with the data and selectors.
Rolled back: 654e508
from dockerode.
Related Issues (20)
- Getting one garbage character from container.exec() HOT 4
- Mounting container on directory HOT 1
- Sending stdin on container HOT 3
- dockerode.getConfig().remove() HOT 1
- containerAttach is sending parameter as POST JSON payload while it shouldn't HOT 1
- Pushing an image to private registry with auth not working HOT 1
- Error while installing with pnpm
- ContainerStartOptions does not contain abortSignal property HOT 1
- Missing Changelog HOT 5
- Specifying socketPath but Dockerode is using HTTP. (bun.js) HOT 13
- Image name when we use buildImage doesn't work HOT 1
- Changelog HOT 4
- Undocumented breaking change: container.logs now produces a string HOT 8
- Error building image
- Error to get logs on some containers HOT 1
- Passing filter options to pruneImages HOT 1
- Module parse failed: Unexpected character '�' (1:0) HOT 1
- Restore exec stream
- Source directory and Dockerfile in different locations HOT 1
- Clone a container
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerode.