add Dockerfile
This commit is contained in:
parent
f9c20e73a8
commit
ea1baee470
|
@ -0,0 +1,34 @@
|
|||
################################################################################
|
||||
################################################################## build ###
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 as build
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
COPY ./Server/ ./Server/
|
||||
COPY ./Shared/ ./Shared/
|
||||
|
||||
RUN dotnet publish ./Server/Server.csproj -c Release -o ./out/
|
||||
|
||||
################################################################## build ###
|
||||
################################################################################
|
||||
################################################################ runtime ###
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/runtime:6.0 as runtime
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
RUN mkdir /data/ \
|
||||
&& touch /data/settings.json \
|
||||
&& ln -s /data/settings.json \
|
||||
;
|
||||
|
||||
COPY --from=build /app/out/ ./
|
||||
|
||||
ENTRYPOINT [ "dotnet", "Server.dll" ]
|
||||
|
||||
EXPOSE 1027/tcp
|
||||
VOLUME /data/
|
||||
|
||||
################################################################ runtime ###
|
||||
################################################################################
|
11
README.md
11
README.md
|
@ -4,6 +4,7 @@ The official server for the [Super Mario Odyssey: Online](https://github.com/Cra
|
|||
|
||||
|
||||
## Windows Setup
|
||||
|
||||
1. Download latest build from [Releases](https://github.com/Sanae6/SmoOnlineServer/releases)
|
||||
2. Run `Server.exe`
|
||||
3. `settings.json` is autogenerated in step 2, modify it however you'd like.
|
||||
|
@ -20,6 +21,16 @@ dotnet run --project Server/Server.csproj -c Release
|
|||
```
|
||||
If you ran `dotnet build` instead of `dotnet run`, you can find the binary at `Server/bin/net6.0/Release/Server.exe`
|
||||
|
||||
## Run docker image
|
||||
|
||||
If you have [docker](https://docs.docker.com/) on your system, you can use the existing docker image.
|
||||
That way you don't have to build this server yourself or manually handle executables.
|
||||
|
||||
```shell
|
||||
docker run --rm -it -p 1027:1027 -v smoo-data:/data/ ghcr.io/sanae6/smo-online-server
|
||||
```
|
||||
|
||||
To always check for and use the latest server version you can add `--pull=always` to the options.
|
||||
|
||||
## Commands
|
||||
|
||||
|
|
Loading…
Reference in New Issue