docker stuff
This commit is contained in:
parent
cadbb2ae01
commit
6027f2db5a
2 changed files with 87 additions and 5 deletions
66
Dockerfile
66
Dockerfile
|
@ -1,10 +1,42 @@
|
|||
# https://hub.docker.com/_/microsoft-dotnet-core
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
||||
#FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
||||
# FROM alpine AS build
|
||||
#ARG REPO=mcr.microsoft.com/dotnet/aspnet
|
||||
#FROM $REPO:5.0-alpine3.12-amd64
|
||||
|
||||
WORKDIR /installer
|
||||
COPY ./dotnet-install.sh ./dotnet-install.sh
|
||||
RUN chmod +x dotnet-install.sh
|
||||
RUN ./dotnet-install.sh --channel 3.1
|
||||
#ENV \
|
||||
# # Unset ASPNETCORE_URLS from aspnet base image
|
||||
# ASPNETCORE_URLS= \
|
||||
# DOTNET_SDK_VERSION=5.0.100 \
|
||||
# # Disable the invariant mode (set in base image)
|
||||
# DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
|
||||
# # Enable correct mode for dotnet watch (only mode supported in a container)
|
||||
# DOTNET_USE_POLLING_FILE_WATCHER=true \
|
||||
# # Skip extraction of XML docs - generally not useful within an image/container - helps performance
|
||||
# NUGET_XMLDOC_MODE=skip \
|
||||
# # PowerShell telemetry for docker image usage
|
||||
# POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-Alpine-3.12##
|
||||
|
||||
#RUN apk add --no-cache \
|
||||
# curl \
|
||||
# icu-libs \
|
||||
# wget \
|
||||
# git \
|
||||
# bash
|
||||
#
|
||||
#WORKDIR /installer
|
||||
#RUN wget https://dot.net/v1/dotnet-install.sh
|
||||
##COPY ./dotnet-install.sh ./dotnet-install.sh
|
||||
#RUN chmod +x dotnet-install.sh
|
||||
#RUN ./dotnet-install.sh --channel 3.1
|
||||
#RUN ./dotnet-install.sh --channel 5.0
|
||||
#RUN export PATH=~/.dotnet:$PATH
|
||||
#RUN export DOTNET_ROOT=~/.dotnet
|
||||
#RUN export PATH=$PATH:~/.dotnet
|
||||
##ENV PATH="${PATH}:~/.dotnet"
|
||||
#ENV PATH="~/.dotnet:${PATH}"
|
||||
|
||||
#RUN which dotnet
|
||||
# # Install .NET CLI dependencies
|
||||
# RUN apt-get update \
|
||||
# && apt-get install -y --no-install-recommends \
|
||||
|
@ -28,6 +60,30 @@ RUN ./dotnet-install.sh --channel 3.1
|
|||
# && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
|
||||
# # Trigger first run experience by running arbitrary cmd
|
||||
# && dotnet help
|
||||
FROM ubuntu:groovy as build
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get update \
|
||||
# Install prerequisites
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
wget \
|
||||
ca-certificates \
|
||||
\
|
||||
# Install Microsoft package feed
|
||||
&& wget -q https://packages.microsoft.com/config/ubuntu/20.10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
|
||||
&& dpkg -i packages-microsoft-prod.deb \
|
||||
&& rm packages-microsoft-prod.deb \
|
||||
\
|
||||
# Install .NET
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
dotnet-sdk-5.0 \
|
||||
dotnet-sdk-3.1 \
|
||||
libpng12 \
|
||||
\
|
||||
# Cleanup
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
# copy csproj and restore as distinct layers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue