mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-02 12:09:53 +03:00
Add Dockerfile and compose.yaml (#335)
This PR adds Dockerfile, to run Octobot within a Docker container, and compose.yaml, to run the Octobot container along with any services that the user may require. --------- Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com> Signed-off-by: mctaylors <cantsendmails@mctaylors.ru> Co-authored-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
9e44d49039
commit
84dc248038
4 changed files with 65 additions and 18 deletions
15
Dockerfile
Normal file
15
Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM mcr.microsoft.com/dotnet/sdk:8.0@sha256:35792ea4ad1db051981f62b313f1be3b46b1f45cadbaa3c288cd0d3056eefb83 AS build-env
|
||||
WORKDIR /Octobot
|
||||
|
||||
# Copy everything
|
||||
COPY . ./
|
||||
# Load build argument with publish options
|
||||
ARG PUBLISH_OPTIONS="-c Release"
|
||||
# Build and publish a release
|
||||
RUN dotnet publish ./TeamOctolings.Octobot $PUBLISH_OPTIONS -o out
|
||||
|
||||
# Build runtime image
|
||||
FROM mcr.microsoft.com/dotnet/runtime:8.0@sha256:a335dccd3231f7f9e2122691b21c634f96e187d3840c8b7dbad61ee09500e408
|
||||
WORKDIR /Octobot
|
||||
COPY --from=build-env /Octobot/out .
|
||||
ENTRYPOINT ["./TeamOctolings.Octobot"]
|
Loading…
Add table
Add a link
Reference in a new issue