加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 748 Bytes
一键复制 编辑 原始数据 按行查看 历史
myun0311 提交于 2018-12-20 17:48 . dockerfile
FROM docker.io/microsoft/dotnet AS build-env
RUN mkdir -p /app/out
USER root
WORKDIR /app
COPY . .
RUN cd TaoLeH.WebApi &&\
dotnet publish -r debian.8-x64 -c release -o /app/out --disable-parallel
FROM docker.io/microsoft/dotnet:2.1-runtime
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list &&\
sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
RUN apt update &&\
apt install -y libunwind8-dev &&\
apt-get clean
RUN mkdir /app /nonexistent &&\
chown 65534:65534 /nonexistent &&\
chown 65534:65534 /app
USER 65534
WORKDIR /app
COPY --from=build-env /app/out .
EXPOSE 8001/tcp
ENTRYPOINT ["dotnet", "TaoLeH.WebApi.dll"]
CMD ["--ASPNETCORE_ENVIRONMENT=Development"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化