Skip to content

Commit

Permalink
- support Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorDArcyEvans committed Apr 18, 2023
1 parent f3a0c6e commit d34e7ff
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# https://hub.docker.com/_/microsoft-dotnet
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /source
EXPOSE 80

# copy csproj and restore as distinct layers
COPY *.sln .
COPY NeoGeoSolver.NET/NeoGeoSolver.NET.csproj ./NeoGeoSolver.NET/NeoGeoSolver.NET.csproj
COPY NeoGeoSolver.NET.Tests/NeoGeoSolver.NET.Tests.csproj ./NeoGeoSolver.NET.Tests/NeoGeoSolver.NET.Tests.csproj
COPY NeoGeoSolver.NET.UI.Web/NeoGeoSolver.NET.UI.Web.csproj ./NeoGeoSolver.NET.UI.Web/NeoGeoSolver.NET.UI.Web.csproj
RUN dotnet restore

# copy everything else and build app
COPY . .
WORKDIR /source/NeoGeoSolver.NET.UI.Web
RUN pwd
RUN ls
RUN dotnet publish -c release -o /app

# final stage/image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /app
COPY --from=build /app ./
ENTRYPOINT ["dotnet", "NeoGeoSolver.NET.UI.Web.dll"]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ as a set of reusable C# components.
## Prerequisites
* .NET 7

### Optional
* Docker

## Getting started
```bash
# clone repo
Expand All @@ -26,6 +29,13 @@ $ dotnet run
```
open [NeoGeoSolver.NET](https://localhost:5051/)

### Docker
```bash
$ docker build -t neo-geo-solver .
$ docker run -p 5051:80 neo-geo-solver
```
open [NeoGeoSolver.NET](http://localhost:5051/)

## Supported constraints
* arc circle concentric
* arcs concentric
Expand Down Expand Up @@ -82,6 +92,7 @@ all done for the moment
* ~~more unit tests for solver~~
* ~~multiple constraints~~
* ~~portable UI aka test harness~~
* ~~support Docker~~
* document solver internals

## Further information
Expand Down

0 comments on commit d34e7ff

Please sign in to comment.