Skip to content

Commit

Permalink
Merge pull request #8 from mgr9525/dev
Browse files Browse the repository at this point in the history
add Dockerfile
  • Loading branch information
mgr9525 authored Oct 15, 2020
2 parents f783bb5 + 6a00834 commit 06266a1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## 感谢 lockp111 提供的Dockerfile

FROM golang:1.15.2-alpine AS builder

RUN apk add git gcc libc-dev && git clone https://github.com/mgr9525/gokins.git /build
WORKDIR /build
RUN GOOS=linux GOARCH=amd64 go build -o bin/gokins main.go


FROM alpine:latest AS final

RUN apk update \
&& apk upgrade \
&& apk --no-cache add openssl \
&& apk --no-cache add ca-certificates \
&& rm -rf /var/cache/apk \
&& mkdir -p /app

COPY --from=builder /build/bin/gokins /app
WORKDIR /app
ENTRYPOINT ["/app/gokins"]

0 comments on commit 06266a1

Please sign in to comment.