Joo
Joo
Explore posts from servers
CC#
Created by Joo on 11/16/2023 in #help
Hello World taking 30 seconds + to run
Honestly baffled as to how this is possible. I'm running an ubuntu docker container locally on my m1 mac. I am installing dotnet in my dockerfile with the dotnet-install script like so:
RUN wget https://dot.net/v1/dotnet-install.sh \
&& chmod +x ./dotnet-install.sh \
&& ./dotnet-install.sh --channel 6.0 --install-dir /home/.dotnet \
&& chmod -R og=rwx /home/.dotnet \
&& export PATH="/home/.dotnet:$PATH" \
&& dotnet new console -o /home/project \
&& chmod -R og=rwx /home/project \
RUN wget https://dot.net/v1/dotnet-install.sh \
&& chmod +x ./dotnet-install.sh \
&& ./dotnet-install.sh --channel 6.0 --install-dir /home/.dotnet \
&& chmod -R og=rwx /home/.dotnet \
&& export PATH="/home/.dotnet:$PATH" \
&& dotnet new console -o /home/project \
&& chmod -R og=rwx /home/project \
When I go to run hello world, I copy the hello world c# file into the project and run it like so:
cp main.cs project/Program.cs \
&& dotnet run --project project
cp main.cs project/Program.cs \
&& dotnet run --project project
It may be worth noting that because I'm using jupyterhub to spin up docker containers on demand, the first time I try to run the hello world I get a whole "welcome to C#" spiel and it takes over a minute. However, on all subsequent runs (with the docker container ready) it doesn't do that but it still takes usually around 30-40 seconds at least. Am I missing something? How on earth could it be this slow?
40 replies