Skip to content

Commit

Permalink
update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
supermomonga committed Jun 25, 2023
1 parent 1beb0a1 commit 2e438dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 3 additions & 4 deletions MoEmbed.App/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
FROM mcr.microsoft.com/dotnet/aspnet:7.0-bullseye-slim AS base
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
FROM mcr.microsoft.com/dotnet/sdk:7.0-bullseye-slim AS build
WORKDIR /src
COPY ["MoEmbed.App/MoEmbed.App.csproj", "MoEmbed.App/"]
COPY ["MoEmbed.Core/MoEmbed.Core.csproj", "MoEmbed.Core/"]
Expand All @@ -13,6 +11,7 @@ COPY ["MoEmbed.CodeGeneration/MoEmbed.CodeGeneration.csproj", "MoEmbed.CodeGener
RUN dotnet restore "MoEmbed.App/MoEmbed.App.csproj"
COPY . .
WORKDIR "/src/MoEmbed.App"
RUN dotnet restore --locked-mode
RUN dotnet build "MoEmbed.App.csproj" -c Release -o /app/build

FROM build AS publish
Expand Down
7 changes: 6 additions & 1 deletion README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ MoEmbed is a embed data provider which supports any websites.

## Installation

(TBD)
## Docker

```sh
docker build . -f MoEmbed.App/Dockerfile -t moembed:latest
docker run --rm -it moembed:latest
```

## Requirements

Expand Down

0 comments on commit 2e438dc

Please sign in to comment.