tilt-dev / tilt-dev/tilt

Docker-Compose eats up all space with unused subvolumes

Open
#5,355 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Description

I am not sure if this is a bug or a feature request or maybe I am doing something wrong.

I am trying to implement usage of tilt with docker compose and rust with live updates. But after a few hours of working, I get errors that I am out of space and the source is the subvolumes in /var/lib/docker/bfrs/ so I tried switching to overlay2 and same issue of /var/lib/docker/overlay2/ taking up all the space. I tried adding pruning to the tilt file in hopes it would solve my problem but no luck.

Looking around, I see that the unused subvolumes taking up space is a known docker issue. But if it isn't cleaning up unused subvolumes, it makes it hard to develop on.

Is there a setting in tilt to fix this? or maybe some workaround? or am I simply doing something wrong?

tilt file:

docker_prune_settings( 
  disable = False , 
  max_age_mins = 360 , 
  num_builds = 5 , 
  keep_recent = 2 
  )

docker_compose("./development/docker-compose.yml")



docker_build('feed-ps-rust', '.', build_args={}, dockerfile='./feed-ps/debug.Dockerfile',
  live_update = [
    sync('./feed-ps', '/opt/FeedPs/feed-ps'),
    run('cargo build'),
    restart_container()
  ])

docker compose file:

version: "3.9"
services:
  web:
    image: feed-ps-rust
    build:
        context: ./../feed-ps
        dockerfile: ./debug.Dockerfile
    ports:
        - 3002:3000
    environment:
        - REDIS_URL=redis://feed-ps-cache
        - PORT=3000
    command:
        sh -c './target/debug/feed_ps'
    links:
        - redis
  redis:
    image: redis
    container_name: feed-ps-cache
    expose:
        - 6379

docker file:

FROM rust:slim-buster


WORKDIR /opt/FeedPs/feed-ps

RUN mkdir src && echo "" > src/lib.rs
COPY ./feed-ps/Cargo.lock .
COPY ./feed-ps/Cargo.toml .
RUN cargo build --lib

COPY ../schema ../schema

COPY ../store ../store

ADD ./feed-ps .
ENV RUST_BACKTRACE=1

RUN cargo build

ENTRYPOINT ./target/debug/feed_ps

Tilt doctor output:

Tilt: v0.23.4, built 2021-12-17
System: linux-amd64
---
Docker
- Host: [default]
- Server Version: 20.10.9-ce
- API Version: 1.41
- Builder: 2
- Compose Version: v1.29.2 (build unknown)
---
Kubernetes
- Env: none
- Context: 
- Cluster Name: Unknown
- Namespace: default
- Container Runtime: unknown
- Version: Error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
- Cluster Local Registry: none

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported disk growth with the shown Tilt configuration, development/docker-compose.yml, and debug.Dockerfile. Check how docker_prune_settings interacts with Docker Compose and live updates, using the provided Tilt doctor and Docker version details. Done means determining whether this is a Tilt behavior or an underlying Docker cleanup issue and documenting or fixing the confirmed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, rust
Domain
devops, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.