-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (27 loc) · 718 Bytes
/
Dockerfile
File metadata and controls
32 lines (27 loc) · 718 Bytes
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
FROM golang:latest AS builder
ENV CGO_ENABLED=1
RUN apt -y update && apt -y upgrade
RUN apt-get -y install sqlite3
WORKDIR /scrape
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN go install -v ./cmd/scrape
RUN go install -v ./cmd/scrape-server
WORKDIR /go/bin
FROM debian:12-slim
RUN apt -y update && apt -y upgrade
RUN apt-get -y install \
sqlite3 \
ca-certificates \
curl \
chromium \
gnupg wget apt-transport-https
RUN mkdir -p /scrape/bin
COPY --from=builder /go/bin/* /scrape/bin/
RUN mkdir -p /scrape_data
VOLUME [ "/scrape_data" ]
EXPOSE 8080/tcp
CMD ["cd", "/"]
# The default sqlite db will be in /scrape_data/scrape.db
ENTRYPOINT ["/scrape/bin/scrape-server"]