mirror of
https://github.com/gen2brain/cam2ip.git
synced 2025-12-15 20:08:30 +00:00
Add Dockerfile and image
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM golang:alpine as build
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
RUN apk add --no-cache git
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN CGO_ENABLED=0 go build -tags jpeg -o cam2ip -ldflags "-s -w"
|
||||
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=build /build/cam2ip /cam2ip
|
||||
|
||||
EXPOSE 56000
|
||||
|
||||
ENTRYPOINT ["/cam2ip"]
|
||||
Reference in New Issue
Block a user