Skip to content
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

Simple Game Server Example: Upgrade Docker to 24.0.6 #3531

Merged
merged 9 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions examples/simple-game-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ WITH_ARM64 ?= 1
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
project_path := $(dir $(mkfile_path))
ifeq ($(REPOSITORY),)
server_tag := simple-game-server:0.22
server_tag := simple-game-server:0.23
else
server_tag := $(REPOSITORY)/simple-game-server:0.22
server_tag := $(REPOSITORY)/simple-game-server:0.23
endif

ifeq ($(WITH_WINDOWS), 1)
Expand Down Expand Up @@ -87,13 +87,9 @@ endif
ifeq ($(WITH_ARM64), 1)
push: push-linux-image-arm64
endif
-docker manifest rm $(server_tag)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting we'll want to increment the version number as well in here, since this will be a new build (then we will want to update the simple-game-server version everywhere as well - likely in a separate PR).

docker manifest create $(server_tag) $(push_server_manifest)
docker manifest push $(server_tag) --purge
# TODO: Update to replace `docker manifest` commands if/when the above commands fail (~Docker 24.x)
# Fails with Docker <=20.10.21
#docker buildx imagetools create --tag $(server_tag) \
#$(push_server_manifest)
# Docker >=24.0.6
docker buildx imagetools create --tag $(server_tag) \
$(push_server_manifest)

# Pushes all variants of the Windows images to the container image registry.
push-linux-image-amd64: build
Expand All @@ -114,12 +110,9 @@ build-windows-image-%: ensure-windows-buildx
--tag=$(server_tag)-windows_amd64-$* --build-arg WINDOWS_VERSION=$* . $(WINDOWS_DOCKER_PUSH_ARGS)

ensure-windows-buildx:
# TODO: Remove `--use` and specify `--builder` for each buildx command once Docker 19.03.13 is available.
# `--use` sets the global default buildx context to $(BUILDX_WINDOWS_BUILDER).
#
# Windows image builds must be directed to a specific buildx context.
# The default context does not support building cross platform images.
-DOCKER_CLI_EXPERIMENTAL=enabled docker buildx create --name=$(BUILDX_WINDOWS_BUILDER) --use
# Windows image builds must be directed to a specific buildx context.
# The default context does not support building cross platform images.
-docker buildx create --name=$(BUILDX_WINDOWS_BUILDER) --use

# Build a docker image for the server, and tag it
build-linux-image-amd64:
Expand Down
4 changes: 2 additions & 2 deletions examples/simple-game-server/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ steps:
#
- name: ubuntu
script: |
echo 'FROM gcr.io/cloud-builders/docker\nRUN apt-get install make\nENTRYPOINT [\"/usr/bin/make\"]' > Dockerfile.build
- name: gcr.io/cloud-builders/docker
echo 'FROM gcr.io/cloud-builders/docker:24.0.6\nRUN apt-get install make\nENTRYPOINT [\"/usr/bin/make\"]' > Dockerfile.build
- name: gcr.io/cloud-builders/docker:24.0.6
id: build-make-docker
entrypoint: docker
args: [build, -f, Dockerfile.build, -t, make-docker, .]
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/dev-gameserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.22
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.23
2 changes: 1 addition & 1 deletion examples/simple-game-server/fleet-distributed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.22
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.23
resources:
requests:
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/fleet-tcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.22
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.23
env:
# Disables the UDP listener (Enabled by default)
- name: UDP
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.22
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.23
resources:
requests:
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/gameserver-passthrough.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.22
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.23
env:
- name: PASSTHROUGH
value: 'TRUE'
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/gameserver-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.22
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.23
resources:
requests:
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-game-server/gameserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.22
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.23
resources:
requests:
memory: 64Mi
Expand Down