Skip to content

Commit

Permalink
🐛 Remove size call to make things faster
Browse files Browse the repository at this point in the history
See: moby/moby#6546

Removing the ```?size=1``` parameter results in a snappier response.

34 seconds vs nearly instant.
  • Loading branch information
Gilmour, Gavin committed Jul 27, 2021
1 parent 057eb30 commit 274d963
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions app/src/components/Container.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,6 @@ class Container extends Component {
<p>Command</p>
<p>Image ID</p>
<Box mt={2}>
<p>Size</p>
<p>State</p>
<p>Status</p>
</Box>
Expand Down Expand Up @@ -622,7 +621,6 @@ class Container extends Component {
)}
</Flex>
<Box mt={2}>
<P>{(container.SizeRootFs / 1000000).toFixed(1)} mb</P>
<P>{container.State}</P>
<P>{container.Status}</P>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion server/routes/containers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const got = require("got");

const DOCKER_SOCK = process.env.DOCKER_SOCK;

const CONTAINERS = `${DOCKER_SOCK}/containers/json?all=true&size=true`;
const CONTAINERS = `${DOCKER_SOCK}/containers/json?all=true`;
const CONTAINER_STOP = (id) => `${DOCKER_SOCK}/containers/${id}/stop`;
const CONTAINER_PRUNE = `${DOCKER_SOCK}/containers/prune`;
const CONTAINER = (id) =>
Expand Down

0 comments on commit 274d963

Please sign in to comment.