tilt-dev / tilt-dev/tilt

Consider making `docker_build` args closer to the CLI args

Open
#1,898 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The docs explain that docker_build should be invoked as so:

# docker build -t companyname/frontend ./frontend
docker_build("companyname/frontend", "frontend")

# docker build -t companyname/frontend -f frontend/Dockerfile.dev frontend
docker_build("companyname/frontend", "frontend", dockerfile="frontend/Dockerfile.dev")

# docker build -t companyname/frontend --build-arg target=local frontend
docker_build("companyname/frontend", "frontend", build_args={"target": "local"})

I wrote something like docker_build('hausdorff/alexbot', 'docker') expecting that this would be equivalent to docker build -t hausdorff/alexbot . -f docker/Dockerfile. I think it would have been clearer if docker_build simply adopted the same flag structure as the CLI:

# `docker build -t companyname/frontend ./frontend` (t should take a list or a string)
docker_build("frontend", t="companyname/frontend")

# `docker build -t companyname/frontend -f frontend/Dockerfile.dev frontend`
docker_build("frontend", t="companyname/frontend", f="frontend/Dockerfile.dev")

# docker build -t companyname/frontend --build-arg target=local frontend
docker_build("frontend", t="companyname/frontend", build_args={"target": "local"})

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 with the linked build documentation and trace the current docker_build entry point and argument handling in the repository. Compare its API with the Docker CLI examples in the issue, then determine the compatibility, validation, documentation, and test changes required for the accepted design.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.