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
1 parent
cd23645
commit 9f2ce02
Showing
2 changed files
with
58 additions
and
57 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,11 +1,12 @@ | ||
FROM golang:latest | ||
FROM golang:1.14-alpine AS build | ||
WORKDIR /src/ | ||
COPY . /src/ | ||
ENV GO111MODULE=on | ||
ADD . /build | ||
WORKDIR /build | ||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download | ||
COPY . . | ||
RUN go build -o bin/olricd ./cmd/olricd | ||
RUN CGO_ENABLED=0 go build -o /usr/bin/olricd /src/cmd/olricd | ||
|
||
FROM scratch | ||
COPY --from=build /usr/bin/olricd /usr/bin/olricd | ||
COPY --from=build /src/cmd/olricd/olricd.yaml /etc/olricd.yaml | ||
EXPOSE 3320 3322 | ||
ENTRYPOINT bin/olricd -c cmd/olricd/olricd.yaml | ||
ENTRYPOINT ["/usr/bin/olricd", "-c", "/etc/olricd.yaml"] |
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