Skip to content

Front image build sends node_modules because the root .dockerignore does not exclude it #114

Closed

Description

@fjlopez

What is wrong

The front image is built with the repository root as its context. Docker then applies the root .dockerignore and does not apply front/.dockerignore. The root file does not exclude node_modules, so a checkout with frontend dependencies installed sends those trees to the daemon.

Where

  • docker-compose.yml lines 64-66 set the front context to . and the dockerfile to front/Dockerfile.
  • profiles/postgres/docker-compose.yml lines 11-13 and profiles/oracle/docker-compose.yml lines 14-16 set the front context to ../.., the repository root, with dockerfile front/Dockerfile.
  • The root .dockerignore has no node_modules entry.
  • front/.dockerignore lines 2-3 exclude node_modules/ and **/node_modules/. The rest of that file is also unused for these builds, because it is not next to the context root.

A Docker build was not run.

Why it matters

The context includes every installed node_modules directory under the repository. The upload is large, and any later COPY that matches those paths can take the installed tree instead of the lockfile install inside the image.

Smallest fix

Add node_modules/ and **/node_modules/ to the root .dockerignore.

The same root exclusion is required when the component trees are imported into this repository: #105

Activity

  1. added
    bugSomething isn't working
    confirmedReproduced / accepted defect; exempt from stale bot
    on Oct 24, 2026
  2. added theissue type on Oct 24, 2026
  3. added a commit that references this issue on Oct 27, 2026
    18a5007
  4. fjlopez commented on Oct 27, 2026

    @fjlopez
    ContributorAuthor

    Fixed on dev by #131 (18a5007). The root .dockerignore contains node_modules/ and **/node_modules/.

    GitHub left this issue open because the pull request merged into dev, and the repository default branch is main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconfirmedReproduced / accepted defect; exempt from stale bot

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions