Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Further changes - Fixed the context in docker-compose for grand.web. …
Browse files Browse the repository at this point in the history
…Fixes issue #643 #647
  • Loading branch information
KrzysztofPajak committed Oct 4, 2019
1 parent 7fe72e0 commit 82d124f
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 18 deletions.
25 changes: 25 additions & 0 deletions .dockerignore
@@ -0,0 +1,25 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
24 changes: 18 additions & 6 deletions Grand.Web/Dockerfile
@@ -1,11 +1,23 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0.0
ARG source
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .

RUN apt-get update && \
apt-get -y install libgdiplus
RUN ln -s /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libdl.so
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
WORKDIR /src
COPY ["Grand.Web/Grand.Web.csproj", "Grand.Web/"]
COPY ["Grand.Framework/Grand.Framework.csproj", "Grand.Framework/"]
COPY ["Grand.Core/Grand.Core.csproj", "Grand.Core/"]
COPY ["Grand.Services/Grand.Services.csproj", "Grand.Services/"]
COPY ["Grand.Api/Grand.Api.csproj", "Grand.Api/"]
RUN dotnet restore "Grand.Web/Grand.Web.csproj"
COPY . .
WORKDIR "/src/Grand.Web"
RUN dotnet build "Grand.Web.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Grand.Web.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Grand.Web.dll"]
9 changes: 0 additions & 9 deletions docker-compose.ci.build.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docker-compose.dcproj
Expand Up @@ -9,7 +9,7 @@
<DockerServiceName>grand.web</DockerServiceName>
</PropertyGroup>
<ItemGroup>
<None Include="docker-compose.ci.build.yml" />
<None Include=".dockerignore" />
<None Include="docker-compose.override.yml">
<DependentUpon>docker-compose.yml</DependentUpon>
</None>
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Expand Up @@ -2,7 +2,7 @@ version: '3.4'

services:
grand.web:
image: grand.web
image: ${DOCKER_REGISTRY-}grandweb
build:
context: .
dockerfile: Dockerfile
dockerfile: Grand.Web/Dockerfile

0 comments on commit 82d124f

Please sign in to comment.