| |
| |
| FROM oven/bun:1 AS dashboard |
| WORKDIR /build |
| COPY dashboard/package.json dashboard/bun.lock ./ |
| RUN bun install --frozen-lockfile |
| COPY dashboard/ . |
| RUN bun run build |
|
|
| |
| |
| |
| |
| FROM golang:1.26-alpine AS builder |
| RUN apk add --no-cache git |
| WORKDIR /build |
| COPY go.mod go.sum ./ |
| RUN go mod download |
| COPY . . |
| COPY --from=dashboard /build/dist/ internal/dashboard/dashboard/ |
| RUN mv internal/dashboard/dashboard/index.html internal/dashboard/dashboard/dashboard.html |
| RUN go build -ldflags="-s -w" -o pinchtab ./cmd/pinchtab |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| FROM alpine:3.21 |
|
|
| LABEL org.opencontainers.image.source="https://github.com/pinchtab/pinchtab" |
| LABEL org.opencontainers.image.description="High-performance browser automation bridge" |
|
|
| |
| RUN apk add --no-cache \ |
| chromium \ |
| nss \ |
| freetype \ |
| harfbuzz \ |
| ca-certificates \ |
| ttf-freefont \ |
| dumb-init |
|
|
| |
| RUN adduser -D -h /data -g '' pinchtab && \ |
| mkdir -p /data && \ |
| chown pinchtab:pinchtab /data |
|
|
| COPY --from=builder /build/pinchtab /usr/local/bin/pinchtab |
| COPY --chmod=0755 docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh |
|
|
| USER pinchtab |
| WORKDIR /data |
|
|
| |
| |
| ENV HOME=/data \ |
| XDG_CONFIG_HOME=/data/.config |
|
|
| EXPOSE 7860 |
|
|
| HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ |
| CMD wget -q -O /dev/null http://localhost:7860/health || exit 1 |
|
|
| ENTRYPOINT ["/usr/bin/dumb-init", "--"] |
| CMD ["/usr/local/bin/docker-entrypoint.sh", "pinchtab"] |
|
|