mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-24 13:48:49 +08:00

* feat(docker): update base image version to golang:1.21-alpine The Dockerfile has been updated to use the latest version of the base image, golang:1.21-alpine, instead of golang:1.19-alpine. This update ensures that the application is built using the most recent version of the Go programming language. Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com> * fix(ci): update Go version in Semaphore configuration The Go version in the Semaphore configuration file was updated from 1.20 to 1.21. Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com> --------- Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
21 lines
451 B
Docker
21 lines
451 B
Docker
FROM golang:1.21-alpine AS builder
|
|
ARG SVC
|
|
ARG GOARCH
|
|
ARG GOARM
|
|
ARG VERSION
|
|
ARG COMMIT
|
|
ARG TIME
|
|
|
|
WORKDIR /go/src/github.com/mainflux/mainflux
|
|
COPY . .
|
|
RUN apk update \
|
|
&& apk add make\
|
|
&& make $SVC \
|
|
&& mv build/mainflux-$SVC /exe
|
|
|
|
FROM scratch
|
|
# Certificates are needed so that mailing util can work.
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
COPY --from=builder /exe /
|
|
ENTRYPOINT ["/exe"]
|