Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile #3

Merged
merged 1 commit into from
Jul 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add Dockerfile
  • Loading branch information
Miouge1 committed Jul 13, 2018
commit ee32996eba35987972b4e15670b67d62ae7d16aa
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Dockerfile
.gitignore
.git
uptimerobot
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM golang:1.10-alpine as builder
WORKDIR /go/src/github.com/bitfield/uptimerobot/
ADD . .
ENV CGO_ENABLED=0
RUN apk --no-cache add git ca-certificates && \
go get -t . && \
go test && \
go build -o /uptimerobot

FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /uptimerobot /uptimerobot
ENTRYPOINT ["/uptimerobot"]