49 lines
1.9 KiB
Docker
49 lines
1.9 KiB
Docker
# Create a virtual environment with all tools installed
|
|
# ref: https://hub.docker.com/r/opensuse/leap
|
|
FROM opensuse/leap
|
|
|
|
# Install system build dependencies
|
|
ENV PATH=/usr/local/bin:$PATH
|
|
RUN zypper update -y \
|
|
&& zypper install -y git gcc gcc-c++ \
|
|
wget which lsb-release util-linux pkgconfig autoconf libtool zlib-devel \
|
|
&& zypper clean -a
|
|
ENV CC=gcc CXX=g++
|
|
ENTRYPOINT ["/usr/bin/bash", "-c"]
|
|
CMD ["/usr/bin/bash"]
|
|
|
|
# .Net Instal
|
|
RUN zypper update -y \
|
|
&& zypper install -y wget tar gzip libicu-devel
|
|
|
|
RUN mkdir -p /usr/share/dotnet \
|
|
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
|
|
|
|
# see: https://dotnet.microsoft.com/download/dotnet-core/3.1
|
|
RUN dotnet_sdk_version=3.1.413 \
|
|
&& wget -qO dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$dotnet_sdk_version/dotnet-sdk-$dotnet_sdk_version-linux-x64.tar.gz \
|
|
&& dotnet_sha512='2a0824f11aba0b79d3f9a36af0395649bc9b4137e61b240a48dccb671df0a5b8c2086054f8e495430b7ed6c344bb3f27ac3dfda5967d863718a6dadeca951a83' \
|
|
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \
|
|
&& tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \
|
|
&& rm dotnet.tar.gz
|
|
# Trigger first run experience by running arbitrary cmd
|
|
RUN dotnet --info
|
|
|
|
# see: https://dotnet.microsoft.com/download/dotnet-core/5.0
|
|
RUN dotnet_sdk_version=5.0.401 \
|
|
&& wget -qO dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$dotnet_sdk_version/dotnet-sdk-$dotnet_sdk_version-linux-x64.tar.gz \
|
|
&& dotnet_sha512='a444d44007709ceb68d8f72dec0531e17f85f800efc0007ace4fa66ba27f095066930e6c6defcd2f85cdedea2fec25e163f5da461c1c2b8563e5cd7cb47091e0' \
|
|
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \
|
|
&& tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \
|
|
&& rm dotnet.tar.gz
|
|
# Trigger first run experience by running arbitrary cmd
|
|
RUN dotnet --info
|
|
|
|
#ENV TZ=America/Los_Angeles
|
|
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
|
|
WORKDIR /root
|
|
ADD or-tools_amd64_opensuse-leap_v*.tar.gz .
|
|
|
|
RUN cd or-tools_*_v* && make test_dotnet
|