Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
data-center-auto
Commits
9653a6b7
Commit
9653a6b7
authored
Oct 24, 2022
by
lizefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
升级docker 的基础镜像
parent
05780e87
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
11 deletions
+43
-11
Dockerfile
ResetOutofstock/Dockerfile
+15
-11
Dockerfile.original
ResetOutofstock/Dockerfile.original
+22
-0
launchSettings.json
ResetOutofstock/Properties/launchSettings.json
+4
-0
ResetOutofstock.csproj
ResetOutofstock/ResetOutofstock.csproj
+2
-0
No files found.
ResetOutofstock/Dockerfile
View file @
9653a6b7
FROM
microsoft/dotnet:2.1-runtime-alpine AS base
#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/runtime:2.1 AS base
WORKDIR
/app
RUN
/bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
&&
echo
'Asia/Shanghai'
>
/etc/timezone
FROM
m
icrosoft/dotnet:2.1-sdk-alpine
AS build
FROM
m
cr.microsoft.com/dotnet/sdk:2.1
AS build
WORKDIR
/src
COPY
ResetOutofstock/ResetOutofstock.csproj ResetOutofstock/
COPY
AutoTurnOver.DB/AutoTurnOver.DB.csproj AutoTurnOver.DB/
COPY
AutoTurnOver.Utility/AutoTurnOver.Utility.csproj AutoTurnOver.Utility/
COPY
AutoTurnOver.Models/AutoTurnOver.Models.csproj AutoTurnOver.Models/
RUN
dotnet restore ResetOutofstock/ResetOutofstock.csproj
COPY
["ResetOutofstock/ResetOutofstock.csproj", "ResetOutofstock/"]
COPY
["AutoTurnOver.DB/AutoTurnOver.DB.csproj", "AutoTurnOver.DB/"]
COPY
["AutoTurnOver.Utility/AutoTurnOver.Utility.csproj", "AutoTurnOver.Utility/"]
COPY
["AutoTurnOver.Models/AutoTurnOver.Models.csproj", "AutoTurnOver.Models/"]
COPY
["AutoTurnOver.Services/AutoTurnOver.Services.csproj", "AutoTurnOver.Services/"]
RUN
dotnet restore
"ResetOutofstock/ResetOutofstock.csproj"
COPY
. .
WORKDIR
/src/ResetOutofstock
RUN
dotnet build
ResetOutofstock.csproj
-c
Release
-o
/app
WORKDIR
"/src/ResetOutofstock"
RUN
dotnet build
"ResetOutofstock.csproj"
-c
Release
-o
/app/build
FROM
build AS publish
RUN
dotnet publish
ResetOutofstock.csproj
-c
Release
-o
/app
RUN
dotnet publish
"ResetOutofstock.csproj"
-c
Release
-o
/app/publish
FROM
base AS final
WORKDIR
/app
COPY
--from=publish /app .
COPY
--from=publish /app
/publish
.
ENTRYPOINT
["dotnet", "ResetOutofstock.dll"]
\ No newline at end of file
ResetOutofstock/Dockerfile.original
0 → 100644
View file @
9653a6b7
FROM microsoft/dotnet:2.1-runtime-alpine AS base
WORKDIR /app
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
FROM microsoft/dotnet:2.1-sdk-alpine AS build
WORKDIR /src
COPY ResetOutofstock/ResetOutofstock.csproj ResetOutofstock/
COPY AutoTurnOver.DB/AutoTurnOver.DB.csproj AutoTurnOver.DB/
COPY AutoTurnOver.Utility/AutoTurnOver.Utility.csproj AutoTurnOver.Utility/
COPY AutoTurnOver.Models/AutoTurnOver.Models.csproj AutoTurnOver.Models/
RUN dotnet restore ResetOutofstock/ResetOutofstock.csproj
COPY . .
WORKDIR /src/ResetOutofstock
RUN dotnet build ResetOutofstock.csproj -c Release -o /app
FROM build AS publish
RUN dotnet publish ResetOutofstock.csproj -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "ResetOutofstock.dll"]
ResetOutofstock/Properties/launchSettings.json
View file @
9653a6b7
...
...
@@ -5,6 +5,9 @@
"environmentVariables"
:
{
"ASPNETCORE_ENVIRONMENT"
:
"dev"
}
},
"Docker"
:
{
"commandName"
:
"Docker"
}
}
}
\ No newline at end of file
ResetOutofstock/ResetOutofstock.csproj
View file @
9653a6b7
...
...
@@ -6,10 +6,12 @@
<LangVersion>latest</LangVersion>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.2.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />
</ItemGroup>
<ItemGroup>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment