Browse Source
Merge pull request #305 from pushrbx/docker-alpine
Alpine linux docker image
pull/312/head
Sebastian Stehle
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
10 additions and
4 deletions
-
Dockerfile
-
src/Squidex/Squidex.csproj
-
tests/Squidex.Tests/Squidex.Tests.csproj
|
|
|
@ -28,21 +28,25 @@ RUN dotnet restore \ |
|
|
|
&& dotnet test tests/Squidex.Tests/Squidex.Tests.csproj |
|
|
|
|
|
|
|
# Publish |
|
|
|
RUN dotnet publish src/Squidex/Squidex.csproj --output /out/ --configuration Release |
|
|
|
RUN dotnet publish src/Squidex/Squidex.csproj --output /out/alpine --configuration Release -r alpine.3.7-x64 |
|
|
|
|
|
|
|
# |
|
|
|
# Stage 2, Build runtime |
|
|
|
# |
|
|
|
FROM microsoft/dotnet:2.1.0-aspnetcore-runtime |
|
|
|
FROM microsoft/dotnet:2.1-runtime-deps-alpine |
|
|
|
|
|
|
|
# Default AspNetCore directory |
|
|
|
WORKDIR /app |
|
|
|
|
|
|
|
# add libuv |
|
|
|
RUN apk add --no-cache libuv \ |
|
|
|
&& ln -s /usr/lib/libuv.so.1 /usr/lib/libuv.so |
|
|
|
|
|
|
|
# Copy from build stage |
|
|
|
COPY --from=builder /out/ . |
|
|
|
COPY --from=builder /out/alpine . |
|
|
|
|
|
|
|
EXPOSE 80 |
|
|
|
EXPOSE 33333 |
|
|
|
EXPOSE 40000 |
|
|
|
|
|
|
|
ENTRYPOINT ["dotnet", "Squidex.dll"] |
|
|
|
ENTRYPOINT ["./Squidex"] |
|
|
|
@ -6,6 +6,7 @@ |
|
|
|
<PackageId>Squidex</PackageId> |
|
|
|
<PreserveCompilationContext>true</PreserveCompilationContext> |
|
|
|
<TargetFramework>netcoreapp2.1</TargetFramework> |
|
|
|
<RuntimeFrameworkVersion>2.1.1</RuntimeFrameworkVersion> |
|
|
|
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion> |
|
|
|
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
@ -2,6 +2,7 @@ |
|
|
|
<PropertyGroup> |
|
|
|
<OutputType>Exe</OutputType> |
|
|
|
<TargetFramework>netcoreapp2.1</TargetFramework> |
|
|
|
<RuntimeFrameworkVersion>2.1.1</RuntimeFrameworkVersion> |
|
|
|
<RootNamespace>Squidex</RootNamespace> |
|
|
|
<NoWarn>$(NoWarn);NU1605</NoWarn> |
|
|
|
</PropertyGroup> |
|
|
|
|