From 31dcced91da6ce7dc4ac79a606a4a63ac9df4917 Mon Sep 17 00:00:00 2001 From: indiest Date: Tue, 17 Jan 2023 18:14:06 +0800 Subject: [PATCH] - Use alpine to build the tps-channeld image; - Updated the tick interval of 'hifi' channels to 20ms; --- config/channel_settings_hifi.json | 8 ++++---- examples/channeld-ue-tps/Dockerfile | 12 +++++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/config/channel_settings_hifi.json b/config/channel_settings_hifi.json index dc3a4b1..a63f1ba 100644 --- a/config/channel_settings_hifi.json +++ b/config/channel_settings_hifi.json @@ -1,6 +1,6 @@ { "1": { - "TickIntervalMs": 10, + "TickIntervalMs": 20, "DefaultFanOutIntervalMs": 20, "DefaultFanOutDelayMs": 0, "RemoveChannelAfterOwnerRemoved": false, @@ -11,7 +11,7 @@ } }, "2": { - "TickIntervalMs": 10, + "TickIntervalMs": 20, "DefaultFanOutIntervalMs": 20, "DefaultFanOutDelayMs": 0, "RemoveChannelAfterOwnerRemoved": true, @@ -22,7 +22,7 @@ } }, "3": { - "TickIntervalMs": 10, + "TickIntervalMs": 20, "DefaultFanOutIntervalMs": 20, "DefaultFanOutDelayMs": 0, "RemoveChannelAfterOwnerRemoved": true, @@ -33,7 +33,7 @@ } }, "4": { - "TickIntervalMs": 10, + "TickIntervalMs": 20, "DefaultFanOutIntervalMs": 20, "DefaultFanOutDelayMs": 0, "RemoveChannelAfterOwnerRemoved": true, diff --git a/examples/channeld-ue-tps/Dockerfile b/examples/channeld-ue-tps/Dockerfile index 707763f..638a261 100644 --- a/examples/channeld-ue-tps/Dockerfile +++ b/examples/channeld-ue-tps/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.16 +FROM golang:1.18.8-alpine3.16 as builder COPY . /channeld @@ -7,9 +7,15 @@ WORKDIR /channeld/examples/channeld-ue-tps ENV GOPROXY="https://goproxy.io" RUN go get -d -v ./... RUN go install -v ./... -RUN go build -o app . +#RUN go build -o app . +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . + +FROM alpine as prod + +COPY --from=builder /channeld/examples/channeld-ue-tps/app . +COPY ./config ./config EXPOSE 12108 EXPOSE 11288 -CMD ["./app"] \ No newline at end of file +ENTRYPOINT ["./app"] \ No newline at end of file