加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 2.24 KB
一键复制 编辑 原始数据 按行查看 历史
张高兴 提交于 2019-08-15 14:45 . update dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:2.1-stretch-arm32v7 AS build
# FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS build
WORKDIR /app
# publish app
COPY src .
WORKDIR /app/V4l2.Samples
RUN dotnet restore
RUN dotnet publish -c release -r linux-arm -o out
## run app
FROM mcr.microsoft.com/dotnet/core/runtime:2.1-stretch-slim-arm32v7 AS runtime
# FROM mcr.microsoft.com/dotnet/core/runtime:2.1 AS runtime
WORKDIR /app
COPY --from=build /app/V4l2.Samples/out ./
# configure apt sources
########################
# Debian #
########################
# RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free" >/etc/apt/sources.list && \
# echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free" >>/etc/apt/sources.list && \
# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free" >>/etc/apt/sources.list && \
# echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free" >>/etc/apt/sources.list && \
# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free" >>/etc/apt/sources.list && \
# echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free" >>/etc/apt/sources.list && \
# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security stretch/updates main contrib non-free" >>/etc/apt/sources.list && \
# echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security stretch/updates main contrib non-free" >>/etc/apt/sources.list
########################
# Raspbian #
########################
# RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main non-free contrib" >/etc/apt/sources.list && \
# echo "deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main non-free contrib" >>/etc/apt/sources.list
# install System.Drawing native dependencies
RUN apt-get update && \
apt-get install -y --allow-unauthenticated libc6-dev libgdiplus libx11-dev && \
rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["dotnet", "V4l2.Samples.dll"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化