-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (26 loc) · 873 Bytes
/
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
35
36
37
# syntax=docker/dockerfile:1
###
# 1) Build Stage
###
FROM golang:alpine AS builder
# Install git so we can clone the repository
RUN apk add --no-cache git
WORKDIR /app
# Clone the specific branch 'feature/parquet' from the repository
RUN git clone -b feature/parquet https://github.com/streamingfast/substreams-sink-files.git .
# Build the substreams-sink-files binary
RUN go install ./cmd/substreams-sink-files
###
# 2) Minimal Runtime Image
###
FROM alpine
WORKDIR /app
# Copy a custom entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Copy the compiled binary from the build stage
COPY --from=builder /go/bin/substreams-sink-files /usr/local/bin/substreams-sink-files
# Prometheus Metrics & pprof analysis
EXPOSE 9102 6060
# Default command
ENTRYPOINT ["docker-entrypoint.sh"]