Distro agnostic installers
This commit is contained in:
parent
32a29980d8
commit
5a93dffb06
|
|
@ -1,5 +1,5 @@
|
|||
<Project>
|
||||
<Target Name="BuildInstallers" DependsOnTargets="GenerateCumulativeArchives;GenerateRpms;GenerateDebs;GenerateRelabeledInstallers" />
|
||||
<Target Name="BuildInstallers" DependsOnTargets="GenerateCumulativeArchives;GenerateRpms;GenerateDebs" />
|
||||
|
||||
<Target Name="_EnsureInstallerPrerequisites">
|
||||
<MakeDir Directories="$(_InstallersOutputDir)" />
|
||||
|
|
@ -255,7 +255,7 @@
|
|||
<Error Text="@(GeneratedDebFiles->Count()) deb installer files generated." Condition="'@(GeneratedDebFiles->Count())' != 1" />
|
||||
|
||||
<Copy
|
||||
DestinationFiles="$(_InstallersOutputDir)$(DebPrefix)-$(DebVersion)-$(Image)-x64.deb"
|
||||
DestinationFiles="$(_InstallersOutputDir)$(DebPrefix)-$(DebVersion)-x64.deb"
|
||||
SourceFiles="@(GeneratedDebFiles)"
|
||||
OverwriteReadOnlyFiles="True"
|
||||
SkipUnchangedFiles="False"
|
||||
|
|
@ -287,26 +287,6 @@
|
|||
</Target>
|
||||
|
||||
<Target Name="GenerateDebs" DependsOnTargets="_EnsureInstallerPrerequisites">
|
||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="Version=$(Version);Image=debian.8" />
|
||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="Version=$(Version);Image=ubuntu.14.04" />
|
||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateDebOnPlatform" Properties="Version=$(Version);Image=ubuntu.16.04" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_GenerateRelabeledInstaller">
|
||||
<ItemGroup>
|
||||
<Installers Include="$(_InstallersOutputDir)*$(Source)*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy
|
||||
SourceFiles="%(Installers.FullPath)"
|
||||
DestinationFiles="$([System.String]::Copy('%(Installers.FullPath)').Replace('$(Source)','$(Replacement)'))"
|
||||
OverwriteReadOnlyFiles="True"
|
||||
SkipUnchangedFiles="False"
|
||||
UseHardlinksIfPossible="False" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateRelabeledInstallers">
|
||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRelabeledInstaller" Properties="Source=debian.8;Replacement=debian.9" />
|
||||
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_GenerateRelabeledInstaller" Properties="Source=ubuntu.16.04;Replacement=ubuntu.17.04" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
#
|
||||
# Copyright (c) .NET Foundation. All rights reserved.
|
||||
# Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
#
|
||||
|
||||
# Dockerfile that creates a container suitable to build dotnet-cli
|
||||
FROM debian:jessie
|
||||
|
||||
# Misc Dependencies for build
|
||||
RUN apt-get update && \
|
||||
apt-get -qqy install \
|
||||
curl \
|
||||
unzip \
|
||||
gettext \
|
||||
sudo \
|
||||
libunwind8 \
|
||||
libkrb5-3 \
|
||||
libicu52 \
|
||||
liblttng-ust0 \
|
||||
libssl1.0.0 \
|
||||
zlib1g \
|
||||
libuuid1 \
|
||||
debhelper \
|
||||
build-essential \
|
||||
devscripts \
|
||||
git \
|
||||
cmake \
|
||||
clang-3.5 \
|
||||
wget && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Use clang as c++ compiler
|
||||
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-3.5 100
|
||||
RUN update-alternatives --set c++ /usr/bin/clang++-3.5
|
||||
|
||||
# Setup User to match Host User, and give superuser permissions
|
||||
ARG USER_ID=0
|
||||
RUN useradd -m code_executor -u ${USER_ID} -g sudo
|
||||
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
||||
# With the User Change, we need to change permissions on these directories
|
||||
RUN chmod -R a+rwx /usr/local
|
||||
RUN chmod -R a+rwx /home
|
||||
RUN chmod -R 755 /usr/lib/sudo
|
||||
|
||||
# Set user to the one we just created
|
||||
USER ${USER_ID}
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /opt/code
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
#
|
||||
# Copyright (c) .NET Foundation. All rights reserved.
|
||||
# Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
#
|
||||
|
||||
FROM ubuntu:16.04
|
||||
|
||||
# Install the base toolchain we need to build anything (clang, cmake, make and the like)
|
||||
# this does not include libraries that we need to compile different projects, we'd like
|
||||
# them in a different layer.
|
||||
RUN apt-get update && \
|
||||
apt-get install -y cmake \
|
||||
make \
|
||||
llvm-3.5 \
|
||||
clang-3.5 \
|
||||
git \
|
||||
curl \
|
||||
tar \
|
||||
sudo \
|
||||
debhelper \
|
||||
build-essential \
|
||||
devscripts \
|
||||
libunwind8 \
|
||||
libkrb5-3 \
|
||||
libicu55 \
|
||||
liblttng-ust0 \
|
||||
libssl1.0.0 \
|
||||
zlib1g \
|
||||
libuuid1 \
|
||||
liblldb-3.6 \
|
||||
wget && \
|
||||
apt-get clean
|
||||
|
||||
# Setup User to match Host User, and give superuser permissions
|
||||
ARG USER_ID=0
|
||||
RUN useradd -m code_executor -u ${USER_ID} -g sudo
|
||||
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
||||
# With the User Change, we need to change permissions on these directories
|
||||
RUN chmod -R a+rwx /usr/local
|
||||
RUN chmod -R a+rwx /home
|
||||
RUN chmod -R 755 /usr/lib/sudo
|
||||
|
||||
# Set user to the one we just created
|
||||
USER ${USER_ID}
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /opt/code
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
#
|
||||
# Copyright (c) .NET Foundation. All rights reserved.
|
||||
# Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
#
|
||||
|
||||
# Dockerfile that creates a container suitable to build dotnet-cli
|
||||
FROM ubuntu:16.10
|
||||
|
||||
# Misc Dependencies for build
|
||||
RUN apt-get update && \
|
||||
apt-get -qqy install \
|
||||
curl \
|
||||
unzip \
|
||||
gettext \
|
||||
sudo \
|
||||
libunwind8 \
|
||||
libkrb5-3 \
|
||||
libicu57 \
|
||||
liblttng-ust0 \
|
||||
libssl1.0.0 \
|
||||
zlib1g \
|
||||
libuuid1 \
|
||||
liblldb-3.5 \
|
||||
debhelper \
|
||||
build-essential \
|
||||
devscripts \
|
||||
git \
|
||||
cmake \
|
||||
clang-3.5 \
|
||||
wget && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Use clang as c++ compiler
|
||||
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-3.5 100
|
||||
RUN update-alternatives --set c++ /usr/bin/clang++-3.5
|
||||
|
||||
# Setup User to match Host User, and give superuser permissions
|
||||
ARG USER_ID=0
|
||||
RUN useradd -m code_executor -u ${USER_ID} -g sudo
|
||||
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
||||
# With the User Change, we need to change permissions on these directories
|
||||
RUN chmod -R a+rwx /usr/local
|
||||
RUN chmod -R a+rwx /home
|
||||
RUN chmod -R 755 /usr/lib/sudo
|
||||
|
||||
# Set user to the one we just created
|
||||
USER ${USER_ID}
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /opt/code
|
||||
Loading…
Reference in New Issue