feat: speed up docker build
This commit is contained in:
parent
87b8d64bcc
commit
2bf088b4a9
3 changed files with 15 additions and 4 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
- You may need to run `chown -R 65532:65532 <host_path>` on your data directory to ensure the container can write to it.
|
- You may need to run `chown -R 65532:65532 <host_path>` on your data directory to ensure the container can write to it.
|
||||||
- Removing a Split DNS record will no longer make the split domain unresolvable by clients (closes [#231](https://github.com/tale/headplane/issues/231)).
|
- Removing a Split DNS record will no longer make the split domain unresolvable by clients (closes [#231](https://github.com/tale/headplane/issues/231)).
|
||||||
- Reintroduce the toggle for overriding local DNS settings in the Headscale config (closes [#236](https://github.com/tale/headplane/issues/236)).
|
- Reintroduce the toggle for overriding local DNS settings in the Headscale config (closes [#236](https://github.com/tale/headplane/issues/236)).
|
||||||
|
- Prefer cross-compiling in the Dockerfile to speed up builds while still supporting multiple architectures.
|
||||||
|
|
||||||
### 0.6.0 (May 25, 2025)
|
### 0.6.0 (May 25, 2025)
|
||||||
- Headplane 0.6.0 now requires **Headscale 0.26.0** or newer.
|
- Headplane 0.6.0 now requires **Headscale 0.26.0** or newer.
|
||||||
|
|
|
||||||
14
Dockerfile
14
Dockerfile
|
|
@ -1,17 +1,23 @@
|
||||||
FROM jdxcode/mise:latest AS mise-context
|
FROM --platform=$BUILDPLATFORM jdxcode/mise:latest AS mise-context
|
||||||
COPY mise.toml .
|
COPY mise.toml .
|
||||||
RUN mise install
|
RUN mise install
|
||||||
|
|
||||||
FROM mise-context AS go-build
|
FROM --platform=$BUILDPLATFORM mise-context AS go-build
|
||||||
WORKDIR /build/
|
WORKDIR /build/
|
||||||
|
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
COPY cmd/ ./cmd/
|
COPY cmd/ ./cmd/
|
||||||
COPY internal/ ./internal/
|
COPY internal/ ./internal/
|
||||||
RUN mkdir -p /build/app/ && mise run wasm ::: agent
|
|
||||||
|
ARG TARGETOS
|
||||||
|
ARG TARGETARCH
|
||||||
|
RUN mkdir -p /build/app/ && \
|
||||||
|
GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 \
|
||||||
|
mise run wasm ::: agent
|
||||||
|
|
||||||
RUN chmod +x /build/build/hp_agent
|
RUN chmod +x /build/build/hp_agent
|
||||||
|
|
||||||
FROM mise-context AS js-build
|
FROM --platform=$BUILDPLATFORM mise-context AS js-build
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY patches ./patches
|
COPY patches ./patches
|
||||||
COPY package.json pnpm-lock.yaml ./
|
COPY package.json pnpm-lock.yaml ./
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,10 @@
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"react-router-hono-server": "patches/react-router-hono-server.patch"
|
"react-router-hono-server": "patches/react-router-hono-server.patch"
|
||||||
},
|
},
|
||||||
|
"supportedArchitectures": {
|
||||||
|
"os": ["current", "linux"],
|
||||||
|
"cpu": ["x64", "arm64"]
|
||||||
|
},
|
||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
"@biomejs/biome",
|
"@biomejs/biome",
|
||||||
"better-sqlite3",
|
"better-sqlite3",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue