1 Star 0 Fork 0

于旭杰/Smartstore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
Murat Cakir 提交于 2024-09-26 22:37 . Minor Dockerfile fix
# -----------------------------------------------------------
# Creates a Docker image by building and publishing
# the source within the container
# -----------------------------------------------------------
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
# Copy solution and source
ARG SOLUTION=Smartstore.sln
WORKDIR /app
COPY $SOLUTION ./
COPY src/ ./src
COPY test/ ./test
COPY nuget.config ./
# Create Modules dir if missing
RUN mkdir /app/src/Smartstore.Web/Modules -p -v
# Build
RUN dotnet build $SOLUTION -c Release
# Publish
WORKDIR /app/src/Smartstore.Web
RUN dotnet publish Smartstore.Web.csproj -c Release -o /app/release/publish \
--no-self-contained \
--no-restore
# Build Docker image
FROM mcr.microsoft.com/dotnet/aspnet:8.0
EXPOSE 80
EXPOSE 443
ENV ASPNETCORE_URLS="http://+:80;https://+:443"
WORKDIR /app
COPY --from=build /app/release/publish .
# Install wkhtmltopdf
RUN apt update &&\
apt -y install wget &&\
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb &&\
apt -y install ./wkhtmltox_0.12.6.1-3.bookworm_amd64.deb &&\
rm ./wkhtmltox_0.12.6.1-3.bookworm_amd64.deb
ENTRYPOINT ["./Smartstore.Web", "--urls", "http://0.0.0.0:80"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/kuerhero/Smartstore.git
git@gitee.com:kuerhero/Smartstore.git
kuerhero
Smartstore
Smartstore
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385