From 07b91022ee378e1ca1191ed46358f759fac75e1e Mon Sep 17 00:00:00 2001 From: gruberdev Date: Thu, 28 Mar 2024 22:43:27 -0300 Subject: [PATCH] Updated Terraria resources to include new Taskfile format --- servers/terraria/image/Dockerfile | 25 ++++++++++++------------- servers/terraria/image/entrypoint.sh | 2 ++ servers/terraria/image/go.mod | 2 +- servers/terraria/image/go.sum | 6 ++++++ 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/servers/terraria/image/Dockerfile b/servers/terraria/image/Dockerfile index 3d4da47..ade98ba 100644 --- a/servers/terraria/image/Dockerfile +++ b/servers/terraria/image/Dockerfile @@ -1,5 +1,5 @@ # Build stage -FROM golang:1.19.1 as builder +FROM golang:1.22 as builder # Update package lists and install unzip and curl RUN apt-get update \ @@ -17,26 +17,25 @@ RUN go mod tidy && go build -o wrapper . FROM mono:slim # Add OCI annotations for the image -LABEL org.opencontainers.image.authors="gruberdev " +LABEL org.opencontainers.image.authors="gruberdev " LABEL org.opencontainers.image.url="https://github.com/gruberdev/gaming/blob/main/servers/terraria" LABEL org.opencontainers.image.documentation="https://github.com/gruberdev/gaming/blob/main/servers/terraria/README.md" LABEL org.opencontainers.image.source="https://github.com/gruberdev/gaming.git" -LABEL org.opencontainers.image.version="v1.4.4.9" LABEL org.opencontainers.image.licenses="MIT" LABEL org.opencontainers.image.title="Terraria (Agones version)" LABEL org.opencontainers.image.description DESCRIPTION="Terraria dedicated servers with Agones integration." -# Set build argument for Terraria version -ARG TERRARIA_VERSION=1.4.4.9 +ARG VERSION=1.0.0.0 # Set environment variables for server configuration -ENV TERRARIA_MOTD="A server powered by Kubernetes and Agones!" -ENV TERRARIA_PASS="" -ENV TERRARIA_MAXPLAYERS="16" -ENV TERRARIA_WORLDNAME="Example" -ENV TERRARIA_WORLDSIZE="3" -ENV TERRARIA_WORLDSEED="Docker" -ENV TERRARIA_USECONFIGFILE="No" +ENV TERRARIA_MOTD="A server powered by Kubernetes and Agones!" \ + TERRARIA_PASS="" \ + TERRARIA_MAXPLAYERS="16" \ + TERRARIA_WORLDNAME="Example" \ + TERRARIA_WORLDSIZE="3" \ + TERRARIA_WORLDSEED="Docker" \ + TERRARIA_USECONFIGFILE="No" \ + VERSION="$VERSION" # Update package lists and install necessary packages, then clean up RUN apt-get update && \ @@ -48,7 +47,7 @@ RUN apt-get update && \ WORKDIR /server # Download and unzip the Terraria server files -RUN TERRARIA_DOWNLOAD=$(echo $TERRARIA_VERSION | tr -d '.') && \ +RUN TERRARIA_DOWNLOAD=$(echo ${VERSION} | tr -d '.') && \ echo ${TERRARIA_DOWNLOAD} && \ wget https://terraria.org/api/download/pc-dedicated-server/terraria-server-${TERRARIA_DOWNLOAD}.zip \ -O terraria.zip && \ diff --git a/servers/terraria/image/entrypoint.sh b/servers/terraria/image/entrypoint.sh index 2ac3530..e1c4d3f 100755 --- a/servers/terraria/image/entrypoint.sh +++ b/servers/terraria/image/entrypoint.sh @@ -19,6 +19,8 @@ else echo -e "Max Players set to: $TERRARIA_MAXPLAYERS" echo -e "Server Password set to: $TERRARIA_PASS" echo -e "MOTD Set to: $TERRARIA_MOTD" + echo -e "Server version: $VERSION" + fi # If config, we supply it at the command line. diff --git a/servers/terraria/image/go.mod b/servers/terraria/image/go.mod index 64d2a56..505cf8e 100644 --- a/servers/terraria/image/go.mod +++ b/servers/terraria/image/go.mod @@ -1,6 +1,6 @@ module terraria -go 1.19 +go 1.21 require agones.dev/agones v1.30.0 diff --git a/servers/terraria/image/go.sum b/servers/terraria/image/go.sum index be6d8e6..ac43964 100644 --- a/servers/terraria/image/go.sum +++ b/servers/terraria/image/go.sum @@ -1,18 +1,23 @@ agones.dev/agones v1.30.0 h1:BDwCQhXko7cVyJrkvs0/C9SGQDR91Fsg+z477blRseg= agones.dev/agones v1.30.0/go.mod h1:vkKAtL3sm2Sj2/+Y0uAKW1YE02H0+fBgie2ruiKgSdM= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0 h1:kr3j8iIMR4ywO/O0rvksXaJvauGGCMg2zAZIiNZ9uIQ= github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0/go.mod h1:ummNFgdgLhhX7aIiy35vVmQNS0rWXknfPE0qe6fmFXg= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc= golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= @@ -29,3 +34,4 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=