-
-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (23 loc) · 848 Bytes
/
Dockerfile
File metadata and controls
39 lines (23 loc) · 848 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
33
34
35
36
37
38
39
# Copyright (c) 2021-2026 Onur Cinar.
# The source code is provided under GNU AGPLv3 License.
# https://github.com/cinar/indicator
FROM golang:1.22-alpine AS builder
RUN apk add --no-cache git
WORKDIR /build
COPY go.mod ./
RUN go mod download
COPY . .
RUN go build -o indicator-sync ./cmd/indicator-sync/main.go
RUN go build -o indicator-backtest ./cmd/indicator-backtest/main.go
FROM alpine:3.19
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY --from=builder /build/indicator-sync /app/
COPY --from=builder /build/indicator-backtest /app/
RUN mkdir -p /app/data /app/output
RUN addgroup -S indicator && adduser -S indicator -G indicator \
&& chown -R indicator:indicator /app
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
USER indicator
ENTRYPOINT ["docker-entrypoint.sh"]