News for hackers. Stuff that matters.
Re:Static Sites with Python, uv, Caddy, and Docker by theden on Saturday August 23, 2025 @10:52PM (#45000898)
My minor suggestion would be to not to use `COPY . .` as it could slow down the build process if it has to copy everything in the context that's not needed. Also a potential privacy/sec risk if private/secret data is copied the final docker image, but probably not applicable in a multi-stage builds where it's in an aux stage.

If you don't want to have multiple `COPY`s, you can add a `.dockerignore` file (https://docs.docker.com/build/concepts/context/#dockerignore...) with the `COPY . .` directive and effectively configure an allowlist of paths, e.g.,

  *
  !src/
  !requirements.txt

There are no comments on this comment yet.