Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

docker: optimize setup and ensure compatibility with internal/ structure

Luigi Agostic9ba99b69dba
diff --git a/Dockerfile b/Dockerfile
index e8dde9a2..87d99470 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,28 +10,30 @@ RUN go build -ldflags="-s -w" -o pinchtab ./cmd/pinchtab
# Runtime stage
FROM alpine:latest
+LABEL org.opencontainers.image.source="https://github.com/pinchtab/pinchtab"
+LABEL org.opencontainers.image.description="High-performance browser automation bridge"
+
# Install Chromium and dependencies
RUN apk add --no-cache \
chromium \
nss \
freetype \
- freetype-dev \
harfbuzz \
ca-certificates \
ttf-freefont \
dumb-init
-# Create non-root user
-RUN adduser -D -g '' pinchtab
+# Create non-root user and state directory
+RUN adduser -D -g '' pinchtab && \
+ mkdir -p /data && \
+ chown pinchtab:pinchtab /data
# Copy binary from builder
COPY --from=builder /build/pinchtab /usr/local/bin/pinchtab
-# Create state directory
-RUN mkdir -p /data && chown pinchtab:pinchtab /data
-
# Switch to non-root user
USER pinchtab
+WORKDIR /data
# Environment variables
ENV BRIDGE_PORT=9867 \
diff --git a/docker-compose.yml b/docker-compose.yml
index 360c5dc9..e85d0fb6 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -12,7 +12,11 @@ services:
- BRIDGE_PORT=9867
- BRIDGE_HEADLESS=true
- BRIDGE_TOKEN=${PINCHTAB_TOKEN:-}
+ - BRIDGE_STATE_DIR=/data
+ - BRIDGE_PROFILE=/data/chrome-profile
restart: unless-stopped
+ # Shared memory is critical for Chrome stability
+ shm_size: '2gb'
# Required for Chrome to work in container
security_opt:
- seccomp:unconfined