feat(gateway): added first implement of the Gateway (MQTT, Influx, REST)
Signed-off-by: Klagarge <remi@heredero.ch>
This commit is contained in:
27
gateway/Dockerfile
Normal file
27
gateway/Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM golang:1.23-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./src/go.mod ./src/go.sum ./
|
||||
RUN go mod tidy
|
||||
|
||||
COPY ./src .
|
||||
#RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o /gateway .
|
||||
RUN go build -o /gateway .
|
||||
|
||||
|
||||
FROM alpine:latest AS certs
|
||||
RUN apk --no-cache add ca-certificates
|
||||
|
||||
FROM scratch AS final
|
||||
LABEL org.opencontainers.image.authors="remi.heredero@hevs.ch" \
|
||||
org.opencontainers.image.title="Gateway for SoftwEng course" \
|
||||
org.opencontainers.image.description="This container is an application for the lab on SoftwEng course" \
|
||||
org.opencontainers.image.source="https://gitlab.forge.hefr.ch/team-raclette/project-softweng/-/tree/main/gateway?ref_type=heads"
|
||||
|
||||
COPY --from=builder /gateway /gateway
|
||||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["/gateway"]
|
||||
Reference in New Issue
Block a user