File size: 1,285 Bytes
07c9f6f
10d245e
2768896
07c9f6f
2768896
 
07c9f6f
 
 
2768896
 
 
 
 
 
 
c68c8c4
2768896
 
10d245e
e8102a3
 
 
 
 
 
 
 
 
07c9f6f
64ae39c
b077587
2768896
07c9f6f
 
 
10d245e
2768896
07c9f6f
 
 
 
 
 
2768896
29f94f4
07c9f6f
2768896
07c9f6f
 
2768896
07c9f6f
 
2768896
07c9f6f
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM docker:27-cli

# Install system dependencies, dev tools, Rust
RUN apk add --no-cache \
      bash \
      curl \
      git \
      python3 \
      make \
      build-base \
      libc-dev \
      linux-headers \
      postgresql-dev \
      nodejs \
      npm \
      redis \
      shadow \
      rust \
      cargo

# Remove rust & cargo from apk
RUN apk add --no-cache bash curl git python3 make build-base libc-dev linux-headers postgresql-dev nodejs npm redis shadow

# Install rustup and nightly Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
    && source $HOME/.cargo/env \
    && rustup install nightly \
    && rustup default nightly

# Install pnpm globally
RUN npm install -g pnpm


# --- Create non-root user ---
RUN addgroup -g 1000 appgroup && \
    adduser -D -u 1000 -G appgroup appuser

# Set working directory with correct permissions
WORKDIR /opt/firecrawl
RUN chown -R appuser:appgroup /opt/firecrawl

# Switch to non-root user
USER appuser

# Clone Firecrawl repo
RUN git clone https://github.com/NitinBot001/firecrawl.git .

# Back to project root
WORKDIR /opt/firecrawl

# Expose Firecrawl ports
EXPOSE 3002

# Default command: requires docker.sock mounted to run docker-compose
CMD ["docker-compose", "-f", "docker-compose.yaml", "up", "--build"]