forked from openGemini/openGemini
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.nightly
More file actions
33 lines (20 loc) · 1.11 KB
/
Dockerfile.nightly
File metadata and controls
33 lines (20 loc) · 1.11 KB
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
FROM fedora:latest AS builder
WORKDIR /build
ENV GOPROXY=https://mirrors.huaweicloud.com/repository/goproxy/,https://goproxy.cn,https://proxy.golang.org,direct
ENV CGO_ENABLED=1
RUN dnf install golang gcc gcc-c++ -y --setopt=tsflags=nodocs && dnf clean all
COPY . .
RUN rm -rf go.sum && go mod tidy
RUN go build -ldflags "-s -w" -o ./bin/ts-cli ./app/ts-cli/ &&\
go build -ldflags "-s -w" -o ./bin/ts-server ./app/ts-server/
FROM fedora:latest
WORKDIR /home/opengemini
ENV PATH=$PATH:/home/opengemini/bin
COPY --from=builder /build/bin/* /home/opengemini/bin/
COPY --from=builder /build/config/openGemini.singlenode.conf /home/opengemini/config/opengemini.conf
RUN dnf install -y --setopt=tsflags=nodocs net-tools curl bind-utils procps && dnf clean all &&\
sed -i 's/bind-address = "127.0.0.1:8086"/bind-address = "0.0.0.0:8086"/g' /home/opengemini/config/opengemini.conf &&\
sed -i 's/rpc-address = "127.0.0.1:8305"/rpc-address = "0.0.0.0:8305"/g' /home/opengemini/config/opengemini.conf
EXPOSE 8086
EXPOSE 8305
ENTRYPOINT ["/home/opengemini/bin/ts-server", "-config", "/home/opengemini/config/opengemini.conf"]