ARG VERSION=9.0
FROM mcr.microsoft.com/dotnet/sdk:$VERSION

RUN apt update
RUN apt install curl -y

# Add tools to Path.
RUN echo 'export PATH="$PATH:$HOME/.dotnet/tools/"' | tee -a "$HOME/.bashrc" > /dev/null
# Install NugetForUnity tool: https://github.com/GlitchEnzo/NuGetForUnity
ENV NUGETFORUNITY_VERSION=3.1.3
RUN dotnet tool install --global NuGetForUnity.Cli --version ${NUGETFORUNITY_VERSION}

COPY nuget_utils.sh /nuget_utils.sh
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
