chore(Docker): add docker support
This commit is contained in:
parent
80fdeb1320
commit
07237f62c8
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Dockerfile
|
||||||
|
.gitignore
|
||||||
|
LICENSE.md
|
||||||
|
README.md
|
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
FROM golang:alpine AS build-base
|
||||||
|
|
||||||
|
WORKDIR /tmp/DigitalOceanSnapshotter
|
||||||
|
|
||||||
|
COPY go.mod .
|
||||||
|
COPY go.sum .
|
||||||
|
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
COPY cmd ./cmd
|
||||||
|
|
||||||
|
RUN go build -o ./out ./cmd/DigitalOceanSnapshotter
|
||||||
|
|
||||||
|
FROM alpine:3.9
|
||||||
|
RUN apk add ca-certificates
|
||||||
|
|
||||||
|
COPY --from=build-base /tmp/DigitalOceanSnapshotter/out /app/DigitalOceanSnapshotter
|
||||||
|
|
||||||
|
RUN ["chmod", "+x", "/app/DigitalOceanSnapshotter"]
|
||||||
|
|
||||||
|
CMD ["/app/DigitalOceanSnapshotter"]
|
Loading…
Reference in New Issue
Block a user