-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwitter_scrapper.Dockerfile
34 lines (25 loc) · 1.07 KB
/
twitter_scrapper.Dockerfile
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
ARG FDB_VERSION=7.3.27
FROM foundationdb/foundationdb:${FDB_VERSION} as fdb
FROM golang:1.21
ARG FDB_VERSION
WORKDIR /tmp
RUN apt-get update
# dnsutils is needed to have dig installed to create cluster file
RUN apt-get install -y --no-install-recommends ca-certificates dnsutils
RUN wget "https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/foundationdb-clients_${FDB_VERSION}-1_amd64.deb"
RUN dpkg -i foundationdb-clients_${FDB_VERSION}-1_amd64.deb
ARG GOPROXY
ENV \
GO111MODULE=on \
CGO_ENABLED=1 \
GOOS=linux \
GOARCH=amd64
WORKDIR /go/src/github.com/lueurxax/crypto-tweet-sense/
ADD go.mod go.sum /go/src/github.com/lueurxax/crypto-tweet-sense/
RUN go mod download -x
ADD . .
ARG VERSION
RUN go build -v -ldflags="-w -s -X main.version=${VERSION}" -o /bin/limiters_reader cmd/limiters_reader/*.go
RUN go build -v -ldflags="-w -s -X main.version=${VERSION}" -o /bin/add_twitter_account cmd/add_twitter_account/*.go
RUN go build -v -ldflags="-w -s -X main.version=${VERSION}" -o /bin/crypto-tweet-sense cmd/twitter_scrapper/*.go
CMD /bin/crypto-tweet-sense