You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
539 B
Bash

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Deckerfile 环境变量测试
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS EnvStudy
ENV Dockerfile_version=0.0.2
EXPOSE 80/TCP
WORKDIR /app
COPY WebApiPublish/ /app/
ENTRYPOINT ["dotnet", "DockerStudyApi.dll"]
# docker build -f Dockerfile.ENV -t study.dockerfile.env.webapi:latest -t study.dockerfile.env.webapi:0.0.1 .
# docker run --rm -p 5051:80 -d --name study.dockerfile.env.webapi.run1 study.dockerfile.env.webapi
# 查看日志 docker logs contain_id -f //使用 -f 参数 实时输出ctl + c 退出(不影响容器运行)