Add depot, attendant, jetfire, optimus, ota services with kustomize overlays
This commit is contained in:
26
services/ota_update_go/Dockerfile
Normal file
26
services/ota_update_go/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
ARG BASE_IMAGE=cloud_base_go
|
||||
FROM ${BASE_IMAGE} as builder-go
|
||||
|
||||
WORKDIR /build/ota_update_go
|
||||
COPY ./ota_update_go/go.mod ./ota_update_go/go.sum ./
|
||||
RUN go mod edit -replace fiskerinc.com/modules=../fiskerinc.com/modules \
|
||||
&& go install github.com/swaggo/swag/cmd/swag@v1.7.8 \
|
||||
&& go mod download
|
||||
|
||||
COPY ./ota_update_go ./
|
||||
RUN go mod edit -replace fiskerinc.com/modules=../fiskerinc.com/modules \
|
||||
&& swag init --parseDependency --parseInternal --parseDepth 5 -g main.go \
|
||||
&& go build -tags musl
|
||||
|
||||
FROM alpine:3.17
|
||||
|
||||
RUN apk add --no-cache librdkafka --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \
|
||||
&& apk add --no-cache ca-certificates
|
||||
|
||||
COPY ./modules_go/logger/log_config .
|
||||
COPY --from=builder-go /build/ota_update_go/otaupdate .
|
||||
|
||||
ENV LOG_CONFIG=log_config
|
||||
EXPOSE 8077
|
||||
|
||||
CMD ./otaupdate
|
||||
Reference in New Issue
Block a user