Add Docker image files.

bookmarks
Icedream 2022-04-09 16:25:24 +02:00
parent bd8f873d02
commit 028041236e
Signed by: icedream
GPG Key ID: 468BBEEBB9EC6AEA
2 changed files with 50 additions and 0 deletions

33
.dockerignore Normal file
View File

@ -0,0 +1,33 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
*.syso
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
*.prof
###
*Docker*
*.docker*
#Jenkinsfile
#.github/*

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM golang:1.18-alpine AS build
WORKDIR /usr/src/icecon
COPY go.mod go.sum ./
RUN go mod download
COPY * .
RUN go generate -v ./...
RUN go build -v -ldflags "-s -w" .
###
FROM alpine:3.15
COPY --from=build /usr/src/icecon/icecon /usr/local/bin
STOPSIGNAL SIGTERM
ENTRYPOINT ["/usr/local/bin/icecon"]