-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from kcajmagic/dockerize
adds docker capabilities
- Loading branch information
Showing
4 changed files
with
78 additions
and
0 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
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,24 @@ | ||
FROM golang:alpine as builder | ||
MAINTAINER Jack Murdock <[email protected]> | ||
|
||
# build the binary | ||
WORKDIR /go/src | ||
RUN apk add --update --repository https://dl-3.alpinelinux.org/alpine/edge/testing/ git curl | ||
RUN curl https://glide.sh/get | sh | ||
COPY src/ /go/src/ | ||
|
||
RUN glide -q install --strip-vendor | ||
RUN go build -o petasos_linux_amd64 petasos | ||
|
||
EXPOSE 6400 6401 6402 6403 | ||
RUN mkdir -p /etc/petasos | ||
VOLUME /etc/petasos | ||
|
||
# the actual image | ||
FROM alpine:latest | ||
RUN apk --no-cache add ca-certificates | ||
RUN mkdir -p /etc/petasos | ||
VOLUME /etc/petasos | ||
WORKDIR /root/ | ||
COPY --from=builder /go/src/petasos_linux_amd64 . | ||
ENTRYPOINT ["./petasos_linux_amd64"] |
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,21 @@ | ||
FROM golang:alpine as builder | ||
MAINTAINER Jack Murdock <[email protected]> | ||
|
||
# build the binary | ||
WORKDIR /go/src | ||
COPY src/ /go/src/ | ||
|
||
RUN go build -o petasos_linux_amd64 petasos | ||
|
||
EXPOSE 6400 6401 6402 6403 | ||
RUN mkdir -p /etc/petasos | ||
VOLUME /etc/petasos | ||
|
||
# the actual image | ||
FROM alpine:latest | ||
RUN apk --no-cache add ca-certificates | ||
RUN mkdir -p /etc/petasos | ||
VOLUME /etc/petasos | ||
WORKDIR /root/ | ||
COPY --from=builder /go/src/petasos_linux_amd64 . | ||
ENTRYPOINT ["./petasos_linux_amd64"] |
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,32 @@ | ||
--- | ||
fqdn: petasos | ||
env: test | ||
scheme: http | ||
|
||
primary: | ||
address: ":6400" | ||
health: | ||
address: ":6401" | ||
options: | ||
- "PayloadsOverZero" | ||
- "PayloadsOverHundred" | ||
- "PayloadsOverThousand" | ||
- "PayloadsOverTenThousand" | ||
pprof: | ||
address: ":6402" | ||
metric: | ||
address: ":6403" | ||
metricsOptions: | ||
namespace: "xmidt" | ||
subsystem: "petasos" | ||
|
||
log: | ||
file: "stdout" | ||
level: "DEBUG" | ||
json: false | ||
|
||
|
||
service: | ||
defaultScheme: http | ||
fixed: | ||
- http://talaria:6200 |