forked from heroiclabs/nakama
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Go runtime and Lua runtime local cache.
- Loading branch information
Showing
52 changed files
with
10,120 additions
and
2,263 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 |
---|---|---|
@@ -1,3 +1,21 @@ | ||
# docker build . --rm --build-arg version=2.0.4 --build-arg commit=master -t heroiclabs/nakama:2.0.4 | ||
|
||
FROM golang:1.10-alpine3.7 as builder | ||
|
||
ARG commit | ||
|
||
RUN apk --no-cache add ca-certificates gcc musl-dev git | ||
|
||
WORKDIR /go/src/github.com/heroiclabs/ | ||
RUN git config --global advice.detachedHead false && \ | ||
git clone -q -n https://github.com/heroiclabs/nakama | ||
|
||
WORKDIR /go/src/github.com/heroiclabs/nakama | ||
RUN git checkout -q "$commit" && \ | ||
GOOS=linux GOARCH=amd64 go build && \ | ||
mkdir -p /go/build && \ | ||
mv nakama /go/build | ||
|
||
FROM alpine:3.7 | ||
|
||
MAINTAINER Heroic Labs <[email protected]> | ||
|
@@ -12,12 +30,11 @@ RUN mkdir -p /nakama/data/modules && \ | |
apk --no-cache add ca-certificates curl iproute2 | ||
|
||
WORKDIR /nakama/ | ||
COPY ./nakama ./nakama | ||
COPY --from=builder "/go/build/nakama" /nakama/ | ||
EXPOSE 7349 7350 7351 | ||
|
||
# set entry point to nakama so that it can be invoked from the `docker run nakama` | ||
ENTRYPOINT ["./nakama"] | ||
|
||
# curl fails on non-200 HTTP status code | ||
HEALTHCHECK --interval=5m --timeout=3s \ | ||
CMD curl -f http://localhost:7350/ || exit 1 | ||
|
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,14 @@ | ||
# docker build . --file ./plugin.Dockerfile --build-arg src=sample_go_module | ||
|
||
FROM golang:1.10-alpine3.7 as builder | ||
|
||
ARG src | ||
|
||
WORKDIR /go/src/$src | ||
COPY $src /go/src/$src | ||
|
||
RUN apk --no-cache add ca-certificates gcc musl-dev git && \ | ||
go get -u github.com/heroiclabs/nakama && \ | ||
GOOS=linux go build -buildmode=plugin . && \ | ||
mkdir -p /go/build && \ | ||
mv "/go/src/$src/$src.so" /go/build/ |
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
Oops, something went wrong.