Last active
April 24, 2025 12:38
-
-
Save IATec-Eric-Oliveira/667660026af0cc3cea6e392de41fd854 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/dotnet/sdk:8.0 | |
RUN apt-get update && apt-get install -y build-essential strace git | |
WORKDIR /app | |
RUN wget https://gist.githubusercontent.com/IATec-Eric-Oliveira/218e9db55349cc037dfb960a23267d73/raw/5ad52b3acc52a4607018bc97b088f0e583bac488/HelloWorld.c | |
RUN git clone https://github.com/IATec-Eric-Oliveira/HelloWorldApp.git /app/HelloWorldApp | |
RUN dotnet build /app/HelloWorldApp/HelloWorldApp/HelloWorldApp/HelloWorldApp.csproj -c Release -o /app/HelloWorldInCSApp | |
RUN gcc -o HelloWorldInC HelloWorld.c | |
RUN echo "#!/bin/bash" > run.sh && \ | |
echo "echo '====================== EXECUÇÃO: PROGRAMA EM C ======================' > output" >> run.sh && \ | |
echo "strace -c ./HelloWorldInC >> output" >> run.sh && \ | |
echo '' >> run.sh && \ | |
echo "echo '================== EXECUÇÃO: PROGRAMA EM C# (.NET) ==================' >> output" >> run.sh && \ | |
echo "strace -c dotnet /app/HelloWorldInCSApp/HelloWorldApp.dll >> output" >> run.sh && \ | |
chmod +x run.sh | |
CMD ["bash", "-c", "./run.sh && echo '\n>> Resultado abaixo:' && cat output"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment