Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
44 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
FROM alpine:3.2 | ||
|
||
ENV GOPATH=/gopath \ | ||
SRC=/gopath/src/github.com/caarlos0/cepinator | ||
|
||
WORKDIR $SRC | ||
ADD . $SRC | ||
FROM alpine | ||
RUN apk add --update ca-certificates && rm -rf /var/cache/apk/* /tmp/* | ||
EXPOSE 3000 | ||
|
||
RUN apk add -U git go && \ | ||
go get -v -d ./... && \ | ||
go install -v ./... && \ | ||
apk del git go && \ | ||
rm -rf /gopath/src /gopath/pkg /var/cache/apk/* | ||
|
||
CMD /gopath/bin/cepinator | ||
COPY cepinator / | ||
ENTRYPOINT ./cepinator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
docker run \ | ||
-v "$PWD":/go/src/github.com/caarlos0/cepinator \ | ||
-w /go/src/github.com/caarlos0/cepinator \ | ||
-e GOOS=linux \ | ||
-e GOARCH=amd64 \ | ||
-e CGO_ENABLED=0 \ | ||
golang:1.8 \ | ||
bash -c 'go build -tags netgo --ldflags "-extldflags "-static"" -o cepinator .' | ||
|
||
docker build -t caarlos0/cepinator . | ||
docker push caarlos0/cepinator | ||
docker rmi caarlos0/cepinator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters