-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (28 loc) · 1.08 KB
/
Dockerfile
File metadata and controls
35 lines (28 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Plasmate - Agent-native headless browser
# Multi-arch: linux/amd64, linux/arm64
#
# Build with pre-compiled binaries from CI:
# docker buildx build --platform linux/amd64,linux/arm64 .
#
# Usage:
# docker run -p 9222:9222 ghcr.io/plasmate-labs/plasmate:latest
# docker run ghcr.io/plasmate-labs/plasmate:latest fetch https://example.com
FROM debian:bookworm-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates && \
rm -rf /var/lib/apt/lists/*
ARG TARGETPLATFORM
# Copy the correct binary based on target platform
COPY docker-build/ /tmp/binaries/
RUN case "$TARGETPLATFORM" in \
"linux/amd64") cp /tmp/binaries/plasmate-x86_64-linux /usr/local/bin/plasmate ;; \
"linux/arm64") cp /tmp/binaries/plasmate-aarch64-linux /usr/local/bin/plasmate ;; \
*) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \
esac && \
chmod +x /usr/local/bin/plasmate && \
rm -rf /tmp/binaries
RUN useradd -m -s /bin/sh plasmate
USER plasmate
EXPOSE 9222
ENTRYPOINT ["plasmate"]
CMD ["serve", "--host", "0.0.0.0", "--port", "9222"]