docker-资料
链接:https://pan.baidu.com/s/1XQdwhK6OvpkUFjlfyEv1jQ?pwd=jaco
提取码:jaco
语雀文档:https://www.yuque.com/fairy-era/yg511q/eu30ue
错误积累:
1 docker0: iptables: No chain/target/match by that name.
service docker restart
或
systemctl restart docker
2 开放防火墙端口
输入指令:firewall-cmd --zone=public --add-port=6379/tcp --permanent,开放防火墙指定端口。 输入指令:firewall-cmd --reload,重新加载防火墙。
3 Dockfile文件-参考
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base USER app WORKDIR /app EXPOSE 8080 FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["AOPTest/AOPTest.csproj", "AOPTest/"] RUN dotnet restore "./AOPTest/./AOPTest.csproj" COPY . . WORKDIR "/src/AOPTest" RUN dotnet build "./AOPTest.csproj" -c $BUILD_CONFIGURATION -o /app/build FROM build AS publish ARG BUILD_CONFIGURATION=Release RUN dotnet publish "./AOPTest.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "AOPTest.dll"]