Giter Club home page Giter Club logo

Comments (5)

maiamcc avatar maiamcc commented on May 10, 2024

Hi @johnboiles -- good call, it hadn't occurred to me that this log output could be confusing, but you're totally right! We'll look into whether this can be clarified at all, but know that this is currently expected behavior.

In case you're curious about why this is happening (feel free to ignore this if not):

This is a side-effect of the way we do fast builds. We tar up all your files ourselves, in a format that matches the way we want to un-tar them, and generate a Dockerfile and run it with our homemade tar file as the build context.

So if you call .add(/path/to/source, /path/in/container), we create a tar archive such that all the files in /path/to/source live in the directory /path/in/container. The Dockerfile we generate just has a single add statement: ADD . / -- but because of the way we tar'd everything up, this will unpack everything into the right place on the container.

Hope that makes sense! (If it doesn't and you're still curious about how this all works under the hood, I'm happy to answer more questions.)

from tilt.

johnboiles avatar johnboiles commented on May 10, 2024

Thanks for the explanation! Feel free to close the ticket if you think that’s appropriate.

In my case I had a typo in my run command that made it appear like my files weren’t getting copied in. The ADD log line seemed to confirm this hypothesis so I ended up burning a little time checking that files were copied before I found the real issue

from tilt.

maiamcc avatar maiamcc commented on May 10, 2024

Threw something together -- turns out it's more annoying than it should be to print that ADD statement with something like

# we tarred up everything so it ends up in the right place in your container, promise
ADD . /

πŸ˜• so, seems like this is the next best thing (added some logging that you can get by running tilt with the --verbose flag). @johnboiles does this seem like it would have been helpful to have?

─── Building: fe β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
STEP 1/2 β€” Building from scratch: [gcr.io/windmill-public-containers/servantes/fe]
  β”‚ Tarring context…
    β•Ž /Users/maia/code/prog/src1 --> /path/in/container/1
    β•Ž /Users/maia/code/prog/src2 --> /path/in/container/2
    β•Ž Created tarball (size: 24 MB)
  β”‚ Building image
    β•Ž [1/6] FROM docker.io/library/golang:1.10
    β•Ž [2/6] RUN apt update && apt install -y unzip time make
    β•Ž [3/6] RUN wget https://github.com/google/protobuf/releases/download/...
    β•Ž [4/6] RUN go get github.com/golang/protobuf/protoc-gen-go
    β•Ž [5/6] ADD . /
    β•Ž [6/6] RUN go install github.com/windmilleng/servantes/fe
...

If so, we'll add it in. If not, we'll drop it :)

from tilt.

jazzdan avatar jazzdan commented on May 10, 2024

Maybe it would help to make it more clear that this is docker output, for debugging/showing progress, and not "tilt" output? WDYT?

from tilt.

maiamcc avatar maiamcc commented on May 10, 2024

We added some code to at least give a little more visibility into what's going on if you run tilt in --verbose mode -- going to close this issue. Thanks for the report!

from tilt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.