Skip to content

Dockerfile: fix broken docker build#32101

Closed
github-actions[bot] wants to merge 3 commits into
masterfrom
fix/issue-32100
Closed

Dockerfile: fix broken docker build#32101
github-actions[bot] wants to merge 3 commits into
masterfrom
fix/issue-32100

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

fixes #32100

Docker builds from master were broken in two places:

  1. cmd/openapi/openapi.go was removed in API: generate /api/state documentation from UI types #31530 (replaced by the external tool github.com/evcc-io/openapi-mcp/cmd/openapi-mcp, now declared in go.mod's tool (...) block), but Dockerfile still had COPY cmd/openapi/ cmd/openapi/, referencing a directory that no longer exists. cmd/implement/ (still a local-module tool) remains copied as before.

  2. make ui in the node stage runs npm run build, which since API: generate /api/state documentation from UI types #31530 also runs the openapi generator. That generator needs tsconfig.json, scripts/ and the server/*.yaml specs, none of which were copied into the node stage. They are now, together with an mkdir for the generator's server/mcp output folder.

Also added local tooling directories and *.db to .dockerignore to keep them out of the build context.

🤖 Generated with Claude Code

@GurliGebis

Copy link
Copy Markdown
Contributor

To be able to build the docker image, I had to made the following changes:

diff --git a/.dockerignore b/.dockerignore
index 99766f5a5..365c134c2 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -17,3 +17,6 @@ release
 !entrypoint.sh
 !evcc.dist.yaml
 !package*.json
+!tsconfig.json
+!server
+!server/**
diff --git a/Dockerfile b/Dockerfile
index 23c079cdf..ed7966d8a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,9 +13,12 @@ RUN --mount=type=cache,target=/root/.npm npm ci
 COPY Makefile .
 COPY *.js ./
 COPY *.ts *.mts ./
+COPY tsconfig.json .
 COPY .browserslistrc .
 COPY assets assets
 COPY i18n i18n
+COPY scripts scripts
+COPY server server
 
 RUN make ui
 
@@ -45,7 +48,6 @@ RUN --mount=type=cache,target=${GOMODCACHE} go mod download
 # install tools
 COPY Makefile .
 COPY cmd/implement/ cmd/implement/
-COPY cmd/openapi/ cmd/openapi/
 COPY api/ api/
 RUN --mount=type=cache,target=${GOMODCACHE} make install
 
-- 

@andig
andig enabled auto-merge (squash) July 24, 2026 06:10
@andig
andig disabled auto-merge July 24, 2026 06:10
@andig andig added the bug Something isn't working label Jul 24, 2026
npm run build regenerates the openapi spec from the go sources, which are
not present in the node stage. Run vite build directly and drop the make
install plus Makefile copy that were only needed for it.
Also ignore local tooling dirs in the docker build context.
@andig andig changed the title Dockerfile: remove stale COPY of removed cmd/openapi directory Dockerfile: fix broken docker build Jul 24, 2026
@andig andig added the infrastructure Basic functionality label Jul 24, 2026
npm run build also runs the openapi generator, which needs tsconfig.json,
scripts/ and the server/*.yaml specs plus an existing server/mcp folder for
its output. Copy them into the node stage instead of bypassing make.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working infrastructure Basic functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dockerfile still expects cmd/openapi folder

2 participants