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

sdk arm64 images #2521

Merged
merged 132 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from 119 commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
680f316
Build both arm64 and amd64 sdk img
Ludea Mar 23, 2022
0281ab4
Use arch variable
Ludea Mar 23, 2022
a4b2b5c
Don't use --build-arg when building on amd64, it's the default value
Ludea Mar 23, 2022
2a94635
enable binfmt
Ludea Mar 23, 2022
1c4fa4c
try without quotes
Ludea Mar 23, 2022
ba446c3
debug
Ludea Mar 23, 2022
bc21738
docker info
Ludea Mar 23, 2022
00192de
try with DOCKER_BUILD_KIT=1 DOCKER_CLI_EXPERIMENTAL=enabled
Ludea Mar 23, 2022
2718501
use buildx into build-agones-sdk-image-arm64 step
Ludea Mar 23, 2022
a568924
don't setup binfmt
Ludea Mar 23, 2022
c55df8c
revert to docker -version
Ludea Mar 23, 2022
a16e560
create a new buildx instance
Ludea Mar 23, 2022
fd8f24e
delete amd64 tag
Ludea Mar 23, 2022
b07d874
Use ensure-buildx step only into arm64 step
Ludea Mar 23, 2022
d9a344c
Remove ensure-buildx step
Ludea Mar 23, 2022
7e72b16
Move ensure-buildx into main Makefile
Ludea Mar 23, 2022
8ddbbdd
Move license and src step to sdk parent step
Ludea Mar 23, 2022
1993529
Use builder option
Ludea Mar 24, 2022
2e0db94
Use docker buildx use
Ludea Mar 24, 2022
adef581
Try this
Ludea Mar 24, 2022
7d0b00e
Try this
Ludea Mar 24, 2022
1b3ee2a
Update docker to 20.10.3
Ludea Mar 25, 2022
12019d4
Use --builder option
Ludea Mar 25, 2022
4661fb6
Merge branch 'main' into arm_images
Ludea Mar 25, 2022
a5c8069
Restore deleted step
Ludea Mar 25, 2022
9b6cf0d
Try WITH_ARM=0
Ludea Apr 1, 2022
1fe21fb
Debug
Ludea Apr 1, 2022
853e164
Missing arm64 sdk server img
Ludea Apr 1, 2022
0f360d9
Missing endif
Ludea Apr 1, 2022
588e182
Delete imagetools
Ludea Apr 1, 2022
218c81f
Delete buildx inspect
Ludea Apr 1, 2022
191d411
Delete expérimental and add arch argument for sdk img
Ludea Apr 1, 2022
9920f73
Try this
Ludea Apr 1, 2022
65bd25b
Improve sdk server img build
Ludea Apr 1, 2022
f7c9481
Fix wrong builder
Ludea Apr 1, 2022
3fa1b38
Try this
Ludea Apr 1, 2022
bbd1490
Delete manifest
Ludea Apr 1, 2022
7623c4d
Fix manifest
Ludea Apr 1, 2022
54a6d8f
Fix manifest tag
Ludea Apr 1, 2022
a7610da
Arm img tag and use amend flag
Ludea Apr 1, 2022
11891ef
Push arm img
Ludea Apr 1, 2022
415a44a
Typo
Ludea Apr 1, 2022
1c36f27
Improve push sdk img
Ludea Apr 1, 2022
5b5f4d9
Typo
Ludea Apr 1, 2022
f54efc5
Don't use amend flag
Ludea Apr 1, 2022
439fdce
Fix arm64 push command and re enable amend flag
Ludea Apr 1, 2022
e12de03
Try this
Ludea Apr 1, 2022
49020b9
Space
Ludea Apr 1, 2022
f064809
Try this
Ludea Apr 1, 2022
0a7fd8d
Debug
Ludea Apr 2, 2022
2b477a1
debug
Ludea Apr 2, 2022
01c06cf
Debug
Ludea Apr 2, 2022
4f8d5e8
debug
Ludea Apr 2, 2022
c8faf7c
Debug
Ludea Apr 2, 2022
9416890
debug
Ludea Apr 2, 2022
980ea1b
debug
Ludea Apr 2, 2022
c1d2765
debug
Ludea Apr 2, 2022
7d176ce
debug
Ludea Apr 2, 2022
a684f1c
debug
Ludea Apr 2, 2022
db76522
debug
Ludea Apr 2, 2022
be2015f
debug
Ludea Apr 2, 2022
8489fa2
Debug
Ludea Apr 2, 2022
52ddde2
debug
Ludea Apr 2, 2022
09a3b15
Debug
Ludea Apr 2, 2022
2239529
Debug
Ludea Apr 2, 2022
2600247
Debug
Ludea Apr 2, 2022
0a0e913
Debug
Ludea Apr 2, 2022
b37a284
Debug
Ludea Apr 2, 2022
d006212
Debug
Ludea Apr 2, 2022
6367cc5
Debug
Ludea Apr 2, 2022
a0fe3d3
Debug
Ludea Apr 2, 2022
42ebbf2
Debug
Ludea Apr 2, 2022
c299380
Debug
Ludea Apr 2, 2022
aa9772b
Debug
Ludea Apr 2, 2022
ba62fd8
Debug
Ludea Apr 2, 2022
6f735d1
Enable binfmt
Ludea Apr 3, 2022
b258453
Enable binfmt into ci
Ludea Apr 3, 2022
49d7503
Typo
Ludea Apr 3, 2022
37874bb
Debug
Ludea Apr 3, 2022
0278654
Debug
Ludea Apr 3, 2022
404738e
Debug
Ludea Apr 3, 2022
1f3a184
Use linuxkit binfmt img
Ludea Apr 3, 2022
c72abe0
Debug
Ludea Apr 3, 2022
b59ccf0
Remove useless target
Ludea Apr 3, 2022
244671b
Docs
Ludea Apr 3, 2022
26972b0
Typo
Ludea Apr 3, 2022
4632cbe
Debug
Ludea Apr 3, 2022
01b1098
Debug
Ludea Apr 3, 2022
7dcfa4b
Debug
Ludea Apr 3, 2022
a481d42
Debug
Ludea Apr 3, 2022
2b85666
Debug
Ludea Apr 3, 2022
5726bf5
Debug
Ludea Apr 3, 2022
45c4ec2
Debug
Ludea Apr 3, 2022
06b4f10
Debug
Ludea Apr 3, 2022
a24e7fd
Typo
Ludea Apr 3, 2022
c69489a
Debug
Ludea Apr 3, 2022
5249ef3
Merge branch 'main' into arm_images
Ludea Apr 6, 2022
a667bd1
Merge branch 'main' into arm_images
Ludea Apr 7, 2022
2b27ace
Merge branch 'main' into arm_images
Ludea Apr 7, 2022
c2ed4ed
Merge branch 'main' into arm_images
Ludea Apr 8, 2022
fa32f51
remove TODO
Ludea Apr 8, 2022
42b5645
remove docker command debug
Ludea Apr 8, 2022
c71e622
move binfmt to makefile to build arm64 image on local machine
Ludea Apr 8, 2022
b0a3095
remove binfmt from cloudbuild
Ludea Apr 8, 2022
c391778
Merge branch 'main' into arm_images
Ludea Apr 8, 2022
0c087c6
Remove tag since cloudBuild use 20.x.x.
Ludea Apr 16, 2022
cdf9e95
Merge branch 'main' into arm_images
Ludea Apr 16, 2022
e4e10d9
Remove useless step
Ludea Apr 19, 2022
5fe6db7
Use Cloud builder 20.10.13
Ludea Apr 19, 2022
f57db57
Install binfmt when creating build-image
Ludea Apr 19, 2022
0de6411
Delete step
Ludea Apr 19, 2022
5746995
Typo
Ludea Apr 19, 2022
6ebd31b
Merge branch 'main' into arm_images
Ludea Apr 21, 2022
f88e15e
Merge branch 'main' into arm_images
Ludea Apr 21, 2022
97c9e83
Merge branch 'main' into arm_images
markmandel Apr 21, 2022
822c4c3
Feedback
Ludea Apr 22, 2022
6d9e0ef
Merge branch 'main' into arm_images
Ludea Apr 22, 2022
140816b
remove debugging command
Ludea Apr 22, 2022
2d91f88
delete useless variable
Ludea Apr 22, 2022
2c4574e
Initial cleanup.
markmandel Apr 22, 2022
9986756
remove duplicated step
Ludea Apr 25, 2022
030b09b
Merge branch 'arm_images' into pr/arm_images
Ludea Apr 25, 2022
e80be72
Merge pull request #1 from markmandel/pr/arm_images
Ludea Apr 25, 2022
dae4c85
remove useless target
Ludea Apr 25, 2022
af45e9d
Merge branch 'main' into arm_images
Ludea Apr 25, 2022
3b1e6c4
Merge branch 'main' into arm_images
Ludea Apr 26, 2022
ec06756
Merge branch 'main' into arm_images
Ludea Apr 26, 2022
7a0c947
Merge branch 'main' into arm_images
Ludea Apr 26, 2022
6e2082d
Merge branch 'main' into arm_images
Ludea Apr 27, 2022
855d17d
Merge branch 'main' into arm_images
Ludea Apr 28, 2022
09f19f8
Merge branch 'main' into arm_images
roberthbailey Apr 28, 2022
01b960a
Remove comment
Ludea Apr 28, 2022
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
61 changes: 41 additions & 20 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ controller_tag = $(REGISTRY)/agones-controller:$(VERSION)
sidecar_tag = $(REGISTRY)/agones-sdk:$(VERSION)

ifeq ($(WITH_WINDOWS), 1)
sidecar_linux_amd64_tag = $(sidecar_tag)-linux_amd64
sidecar_linux_amd64_tag = $(REGISTRY)/agones-sdk:$(VERSION)-linux-amd64
sidecar_linux_arm64_tag = $(REGISTRY)/agones-sdk:$(VERSION)-linux-arm64
else
sidecar_linux_amd64_tag = $(sidecar_tag)
sidecar_linux_amd64_tag = $(REGISTRY)/agones-sdk:$(VERSION)-amd64
sidecar_linux_arm64_tag = $(REGISTRY)/agones-sdk:$(VERSION)-arm64
endif

ping_tag = $(REGISTRY)/agones-ping:$(VERSION)
Expand Down Expand Up @@ -360,7 +362,6 @@ uninstall: $(ensure-build-image)
$(DOCKER_RUN) \
helm uninstall agones --namespace=agones-system


# Build a static binary for the gameserver controller
ifeq ($(WITH_ARM64), 1)
build-controller-binary: $(ensure-build-image) build-controller-binary-linux-amd64 build-controller-binary-linux-arm64
Expand Down Expand Up @@ -428,34 +429,41 @@ build-agones-sdk-binary-windows: $(ensure-build-image)
-o $(go_build_base_path)/cmd/sdk-server/bin/sdk-server.windows.amd64.exe $(go_rebuild_flags) $(go_version_flags) $(agones_package)/cmd/sdk-server

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
-docker buildx create --name=$(BUILDX_WINDOWS_BUILDER)
markmandel marked this conversation as resolved.
Show resolved Hide resolved
markmandel marked this conversation as resolved.
Show resolved Hide resolved

# Build the image for the gameserver sidecar and SDK binaries
build-agones-sdk-image: $(ensure-build-image) build-agones-sdk-binary build-licenses build-required-src-dist
build-agones-sdk-image: $(ensure-build-image) build-licenses build-required-src-dist build-agones-sdk-image-amd64
ifeq ($(WITH_ARM64), 1)
build-agones-sdk-image: $(ensure-build-image) build-licenses build-required-src-dist build-agones-sdk-image-arm64
Ludea marked this conversation as resolved.
Show resolved Hide resolved
endif

build-agones-sdk-image-amd64: $(ensure-build-image) build-agones-sdk-binary
docker build $(agones_path)/cmd/sdk-server/ --tag=$(sidecar_linux_amd64_tag) $(DOCKER_BUILD_ARGS)
build-agones-sdk-image-arm64: $(ensure-build-image) build-agones-sdk-binary
docker buildx build --platform linux/arm64 --build-arg ARCH=arm64 $(agones_path)/cmd/sdk-server/ --tag=$(sidecar_linux_arm64_tag) $(DOCKER_BUILD_ARGS)

build-agones-sdk-image-windows: $(foreach winver, $(WINDOWS_VERSIONS), build-agones-sdk-image-windows-$(winver))

# Build the image for the gameserver sidecar and SDK binaries
build-agones-sdk-image-windows-%: $(ensure-build-image) build-agones-sdk-binary build-licenses build-required-src-dist ensure-windows-buildx
# TODO: Use `--builder $(BUILDX_WINDOWS_BUILDER)` later once Docker 19.03.13 is the build target. Cloud Build has 19.03.08 https://cloud.google.com/cloud-build/release-notes
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --platform windows/amd64 -f $(agones_path)/cmd/sdk-server/Dockerfile.windows --tag=$(sidecar_tag)-windows_amd64-$* --build-arg WINDOWS_VERSION=$* $(DOCKER_BUILD_ARGS) $(agones_path)/cmd/sdk-server/ $(WINDOWS_DOCKER_PUSH_ARGS)
docker buildx build --platform windows/amd64 --builder $(BUILDX_WINDOWS_BUILDER) -f $(agones_path)/cmd/sdk-server/Dockerfile.windows --tag=$(sidecar_tag)-windows_amd64-$* --build-arg WINDOWS_VERSION=$* $(DOCKER_BUILD_ARGS) $(agones_path)/cmd/sdk-server/ $(WINDOWS_DOCKER_PUSH_ARGS)
markmandel marked this conversation as resolved.
Show resolved Hide resolved

# Build sidecar image only
build-agones-sdk-server-image: $(ensure-build-image) build-agones-sdk-binary-linux build-licenses build-required-src-dist
build-agones-sdk-server-image: $(ensure-build-image) build-agones-sdk-binary-linux build-licenses build-required-src-dist build-agones-sdk-server-image-amd64
ifeq ($(WITH_ARM64), 1)
build-agones-sdk-server-image: build-agones-sdk-server-image-arm64
endif

build-agones-sdk-server-image-arm64:
docker buildx build $(agones_path)/cmd/sdk-server/ --tag=$(sidecar_linux_arm64_tag) --build-arg ARCH=arm64 --platform linux/arm64 $(DOCKER_BUILD_ARGS)
build-agones-sdk-server-image-amd64: $(ensure-build-image) build-agones-sdk-binary-linux build-licenses build-required-src-dist
docker build $(agones_path)/cmd/sdk-server/ --tag=$(sidecar_linux_amd64_tag) $(DOCKER_BUILD_ARGS)

build-agones-sdk-server-image-windows: $(foreach winver, $(WINDOWS_VERSIONS), build-agones-sdk-server-image-windows-$(winver))

# Build sidecar image only
build-agones-sdk-server-image-windows-%: $(ensure-build-image) build-agones-sdk-binary-linux build-licenses build-required-src-dist ensure-windows-buildx
# TODO: Use `--builder $(BUILDX_WINDOWS_BUILDER)` later once Docker 19.03.13 is the build target. Cloud Build has 19.03.08 https://cloud.google.com/cloud-build/release-notes
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build $(agones_path)/cmd/sdk-server/ -f $(agones_path)/cmd/sdk-server/Dockerfile.windows --platform windows/amd64 --tag=$(sidecar_tag)-windows_amd64-$* --build-arg WINDOWS_VERSION=$* $(DOCKER_BUILD_ARGS) $(WINDOWS_DOCKER_PUSH_ARGS)
docker buildx build $(agones_path)/cmd/sdk-server/ --builder $(BUILDX_WINDOWS_BUILDER) -f $(agones_path)/cmd/sdk-server/Dockerfile.windows --platform windows/amd64 --tag=$(sidecar_tag)-windows_amd64-$* --build-arg WINDOWS_VERSION=$* $(DOCKER_BUILD_ARGS) $(WINDOWS_DOCKER_PUSH_ARGS)
markmandel marked this conversation as resolved.
Show resolved Hide resolved

# Build a static binary for the ping service
build-ping-binary: $(ensure-build-image)
Expand Down Expand Up @@ -496,22 +504,35 @@ build-allocator-image: $(ensure-build-image) build-allocator-binary build-licens
docker build $(agones_path)/cmd/allocator/ --tag=$(allocator_tag) $(DOCKER_BUILD_ARGS)

ifeq ($(WITH_WINDOWS), 1)
ifeq ($(WITH_ARM64), 1)
Copy link
Member

Choose a reason for hiding this comment

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

Oh boy this is fun. I hope we don't have to include another architecture down the line 😆

Not for this PR, but I wonder if we could eventually do some kind of a list, so that you could do something more like make make build ARCH=windows,arm64,amd64 rather than having all these WITH_* statements.

# push the gameservers sidecar image
push-agones-sdk-image: push-agones-sdk-linux-image
push-agones-sdk-image: push-agones-sdk-linux-image-arm64 push-agones-sdk-linux-image-amd64
# Ensure that the sidecar manifest is removed before creating a new one.
-DOCKER_CLI_EXPERIMENTAL=enabled docker manifest rm $(sidecar_tag)
# Using docker buildx with foreign OSes is a bit awkward. Since the layers but not the tag
# was cached we have to rebuild the image (which should be fast since it's cached).
$(MAKE) WINDOWS_DOCKER_PUSH_ARGS=--push build-agones-sdk-image-windows
# Agones should start using the -linux_amd64 suffix for Linux images. This allows multi-arch support in the future.
roberthbailey marked this conversation as resolved.
Show resolved Hide resolved
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create $(sidecar_tag) $(sidecar_linux_amd64_tag) $(sidecar_linux_arm64_tag) $(foreach windows_version, $(WINDOWS_VERSIONS), $(sidecar_tag)-windows_amd64-$(windows_version))
markmandel marked this conversation as resolved.
Show resolved Hide resolved
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push $(sidecar_tag)
else
push-agones-sdk-image:
# Ensure that the sidecar manifest is removed before creating a new one.
-DOCKER_CLI_EXPERIMENTAL=enabled docker manifest rm $(sidecar_tag)
# Using docker buildx with foreign OSes is a bit awkward. Since the layers but not the tag
# was cached we have to rebuild the image (which should be fast since it's cached).
$(MAKE) WINDOWS_DOCKER_PUSH_ARGS=--push build-agones-sdk-image-windows
# Agones should start using the -linux_amd64 suffix for Linux images. This allows multi-arch support in the future.
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create $(sidecar_tag) $(sidecar_linux_amd64_tag) $(foreach windows_version, $(WINDOWS_VERSIONS), $(sidecar_tag)-windows_amd64-$(windows_version))
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create $(sidecar_tag) --amend $(sidecar_linux_amd64_tag) --amend $(foreach windows_version, $(WINDOWS_VERSIONS), $(sidecar_tag)-windows_amd64-$(windows_version))
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push $(sidecar_tag)
endif
else
push-agones-sdk-image: push-agones-sdk-linux-image
push-agones-sdk-image: push-agones-sdk-linux-image-amd64
Copy link
Member

Choose a reason for hiding this comment

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

I look forward to locally developing with WITH_WINDOWS=0 and WITH_ARM=0 and seeing what breaks (but not for this PR, I already know that WITH_WINDOW=0 set globally breaks some stuff in here, but that's not your fault).

endif

# push the gameservers sidecar image
push-agones-sdk-linux-image: $(ensure-build-image)
push-agones-sdk-linux-image-arm64: $(ensure-build-image)
docker push $(sidecar_linux_arm64_tag)
push-agones-sdk-linux-image-amd64: $(ensure-build-image)
Copy link
Member

Choose a reason for hiding this comment

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

I believe that this should depend on build-agones-sdk-image-amd64 instead of having the build image. I tried running this target (having modified the name of the image locally so it wouldn't exist) and got an error:

make: *** [Makefile:521: push-agones-sdk-linux-image-amd64] Error 1

For some reason the arm and windows targets above didn't have this issue, and I'm not sure why (maybe because they use buildx?).

Copy link
Member

Choose a reason for hiding this comment

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

I tested this change locally and it had the desired effect.

Copy link
Member

Choose a reason for hiding this comment

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

I'm going to merge this PR as-is and will send a follow up PR to tweak this line.

Copy link
Member

Choose a reason for hiding this comment

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

docker push $(sidecar_linux_amd64_tag)

# Generate the Embedded CRD openapi
Expand Down
6 changes: 6 additions & 0 deletions build/includes/build-image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ build-build-image:
clean-build-image:
docker rmi $(build_tag)

ensure-arm-builder:
docker run --privileged --rm tonistiigi/binfmt:qemu-v6.2.0 --install arm64

ensure-build-config:
-mkdir -p $(kubeconfig_path)
-mkdir -p $(build_path)/.gocache
Expand All @@ -39,6 +42,9 @@ ensure-build-config:
# create the build image if it doesn't exist
ensure-build-image: ensure-build-config
$(MAKE) ensure-image IMAGE_TAG=$(build_tag) BUILD_TARGET=build-build-image
ifeq ($(WITH_ARM64), 1)
ensure-build-image: ensure-arm-builder
endif

# attempt to pull the image, if it exists and rename it to the local tag
# exit's clean if it doesn't exist, so can be used on CI
Expand Down
7 changes: 3 additions & 4 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ steps:
# Print Docker version
#

- name: "gcr.io/cloud-builders/docker"
- name: "gcr.io/cloud-builders/docker:20.10.13"
id: docker-version
args: ["--version"]

Expand Down Expand Up @@ -51,7 +51,6 @@ steps:
- '--key=$_CPP_SDK_CONFORMANCE_CACHE_KEY-$( checksum sdks/cpp/cmake/prerequisites.cmake )'
waitFor: ['-']


- name: gcr.io/$PROJECT_ID/restore_cache
Ludea marked this conversation as resolved.
Show resolved Hide resolved
id: rust-sdk-build-restore-cache
args:
Expand All @@ -64,9 +63,9 @@ steps:
#

- name: "ubuntu"
args: ["bash", "-c", "echo 'FROM gcr.io/cloud-builders/docker\nRUN apt-get install make\nENTRYPOINT [\"/usr/bin/make\"]' > Dockerfile.build"]
args: ["bash", "-c", "echo 'FROM gcr.io/cloud-builders/docker:20.10.13\nRUN apt-get install make\nENTRYPOINT [\"/usr/bin/make\"]' > Dockerfile.build"]
waitFor: ['-']
- name: "gcr.io/cloud-builders/docker"
- name: "gcr.io/cloud-builders/docker:20.10.13"
id: build-make-docker
args: ['build', '-f', 'Dockerfile.build', '-t', 'make-docker', '.'] # we need docker and make to run everything.

Expand Down
4 changes: 2 additions & 2 deletions cmd/sdk-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# limitations under the License.

FROM alpine:3.14

ARG ARCH=amd64
RUN apk --update add ca-certificates && \
adduser -D -u 1000 agones

COPY --chown=agones:agones ./bin/sdk-server.linux.amd64 /home/agones/sdk-server
COPY --chown=agones:agones ./bin/sdk-server.linux.$ARCH /home/agones/sdk-server
COPY --chown=agones:agones ./bin/LICENSES ./bin/dependencies-src.tgz /home/agones/

USER 1000
Expand Down