diff --git a/Dockerfile b/Dockerfile index 21b48f8563..c847a532cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN dotnet publish ./ACE.Server/ACE.Server.csproj -a $TARGETARCH -c release -o / # final stage/image FROM mcr.microsoft.com/dotnet/runtime:8.0-jammy ARG DEBIAN_FRONTEND="noninteractive" -WORKDIR /home/app/ace +WORKDIR /ace # install net-tools (netstat for health check) & cleanup RUN apt-get update && \ @@ -38,11 +38,7 @@ RUN apt-get update && \ # add app from build COPY --from=build /ace . -# set correct permissions for app directory and files -RUN chown -R app:app /home/app/ace/ - -# switch to and run app from non-root user -USER app +# run app ENTRYPOINT ["dotnet", "ACE.Server.dll"] # ports and volumes diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 deleted file mode 100644 index 987e5392fb..0000000000 --- a/Dockerfile.arm64 +++ /dev/null @@ -1,50 +0,0 @@ -# This Dockerfile, specific to arm64, should be no longer needed. Leaving in place for legacy purposes. - -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build -ARG TARGETARCH -WORKDIR /Source - -# copy csproj and restore as distinct layers -COPY ./Source/*.sln ./ -COPY ./Source/ACE.Adapter/*.csproj ./ACE.Adapter/ -COPY ./Source/ACE.Common/*.csproj ./ACE.Common/ -COPY ./Source/ACE.Database/*.csproj ./ACE.Database/ -COPY ./Source/ACE.Database.Tests/*.csproj ./ACE.Database.Tests/ -COPY ./Source/ACE.DatLoader/*.csproj ./ACE.DatLoader/ -COPY ./Source/ACE.DatLoader.Tests/*.csproj ./ACE.DatLoader.Tests/ -COPY ./Source/ACE.Entity/*.csproj ./ACE.Entity/ -COPY ./Source/ACE.Server/*.csproj ./ACE.Server/ -COPY ./Source/ACE.Server.Tests/*.csproj ./ACE.Server.Tests/ - -RUN dotnet restore -a $TARGETARCH - -# copy and publish app and libraries -COPY . ../. -RUN dotnet publish ./ACE.Server/ACE.Server.csproj -a $TARGETARCH -c release -o /ace --no-restore - -# final stage/image -FROM mcr.microsoft.com/dotnet/runtime:8.0-jammy -ARG DEBIAN_FRONTEND="noninteractive" -WORKDIR /ace - -# install net-tools (netstat for health check) & cleanup -RUN apt-get update && \ - apt-get install --no-install-recommends -y \ - net-tools && \ - apt-get clean && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* - -# add app from build -COPY --from=build /ace . -ENTRYPOINT ["dotnet", "./ACE.Server.dll"] - -# ports and volumes -EXPOSE 9000-9001/udp -VOLUME /ace/Config /ace/Content /ace/Dats /ace/Logs /ace/Mods - -# health check -HEALTHCHECK --start-period=5m --interval=1m --timeout=3s \ - CMD netstat -an | grep 9000 > /dev/null; if [ 0 != $? ]; then exit 1; fi; diff --git a/docker-compose.arm64 b/docker-compose.arm64 deleted file mode 100644 index 2749edad9c..0000000000 --- a/docker-compose.arm64 +++ /dev/null @@ -1,43 +0,0 @@ -# This docker-compose file, specific to arm64, should be no longer needed. Leaving in place for legacy purposes. - -#version: '3' -services: - - ace-db: - #image: linuxserver/mariadb:latest - #image: mysql/mysql-server:latest - image: mysql:8.0 - container_name: ace-db - env_file: - - docker.env - volumes: - #- ./db-data:/config - - ./db-data:/var/lib/mysql - ports: - - "3306:3306/tcp" - restart: unless-stopped - healthcheck: - test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] - - ace-server: - build: - context: . - dockerfile: Dockerfile.arm64 - image: acemulator/ace:latest-arm64 - depends_on: - ace-db: - condition: service_healthy - container_name: ace-server - env_file: - - docker.env - volumes: - - ./Config:/ace/Config - - ./Content:/ace/Content - - ./Dats:/ace/Dats - - ./Logs:/ace/Logs - - ./Mods:/ace/Mods - ports: - - "9000-9001:9000-9001/udp" - stdin_open: true - #restart: unless-stopped - restart: on-failure