-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update Docker setup #23
Update Docker setup #23
Conversation
|
||
COPY . . | ||
RUN --mount=type=cache,target=/go/pkg/mod/ \ | ||
CGO_ENABLED=0 go build -v -o ${app_dir}/build/server -ldflags "-X 'main.serverBuildString=${build_string}'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, what is the build string? Is this a Go/Pretendo thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a Pretendo-specific thing. @jonbarrow can explain more accurately about what it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@binaryoverload Every game server has 2 servers, the authentication server and the real server (called the "secure server"). The client must first pass through the authentication server before being given the address of the secure server
In the login methods the client uses for the authentication server, the servers build string is sent. It contains information about the server like it's build number, branch, NEX version, etc.
Most games don't care what is set here, but some do scan the build string for relevant data. So it must be set. For example Mario Kart 8 has the following build string branch:origin/project/nfs build:3_10_26_2006_0
Changes:
This updates the Dockerfile to use a new Docker Go template with a few minor changes, including running as a non-root user. This also adds a GitHub Action for building and pushing the Docker image to Docker Hub. This image is currently available at https://hub.docker.com/r/matthewl246/pretendo-friends and will be deleted when this PR is merged.
What I'm implementing was an approved issue.This issue was approved internally.