mirror of
https://gitlab.com/arm-research/smarter/smarter-device-manager.git
synced 2025-08-22 09:56:34 +00:00
First commit of smarter-device-manager
This commit is contained in:
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM golang:alpine as build
|
||||
|
||||
RUN apk update && apk upgrade && apk add tar ca-certificates build-base
|
||||
|
||||
ENV GOPATH /go
|
||||
RUN go version
|
||||
|
||||
WORKDIR /go/src/smarter-device-management
|
||||
COPY . .
|
||||
|
||||
RUN echo $PATH;export CGO_LDFLAGS_ALLOW='-Wl,--unresolved-symbols=ignore-in-object-files' && \
|
||||
go install -ldflags="-s -w" -v smarter-device-management
|
||||
|
||||
FROM alpine
|
||||
|
||||
|
||||
|
||||
RUN apk update && apk upgrade
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
COPY conf.yaml /root/config/conf.yaml
|
||||
COPY --from=build /go/bin/smarter-device-management /usr/bin/smarter-device-management
|
||||
|
||||
|
||||
|
||||
CMD ["smarter-device-management","-logtostderr=true","-v=0"]
|
Reference in New Issue
Block a user