refactor: ajustar dockerfile de desarrollo

This commit is contained in:
Fernando Araoz 2025-01-24 07:21:28 -05:00
parent c430077557
commit be367de3ab
3 changed files with 5 additions and 19 deletions

View File

@ -33,6 +33,7 @@ para crear un proyecto nuevo, vacio, sin tener que instalar ningun programa.
- Ejecutar imagen de desarrollo: - Ejecutar imagen de desarrollo:
`docker run -it --rm -v $(pwd):/app -p 5233:5233 aspnet-dev` `docker run -it --rm -v $(pwd):/app -p 5233:5233 aspnet-dev`
TODO: Dockerfile Una vez la imagen de desarrollo se este ejecutando entrarás a un shell.
Dentro de ese shell ejecuta: `dotnet watch run` para iniciar la aplicacion.
Puedes cancelar con Ctrl-C, reiniciar, ejecutar otros comandos de EF, etc.

View File

@ -30,10 +30,4 @@ ENV PATH="${PATH}:/home/developer/.dotnet/tools"
ENV ASPNETCORE_URLS=http://+:5233 ENV ASPNETCORE_URLS=http://+:5233
ENV ASPNETCORE_ENVIRONMENT=Development ENV ASPNETCORE_ENVIRONMENT=Development
# Script para iniciar el servidor de desarrollo de dotnet ENTRYPOINT ["bash"]
RUN echo '#!/bin/bash\n\
dotnet watch run --no-launch-profile &\n\
/bin/bash' > /home/developer/entrypoint.sh && \
chmod +x /home/developer/entrypoint.sh
ENTRYPOINT ["/home/developer/entrypoint.sh"]

View File

@ -5,16 +5,7 @@
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true, "dotnetRunMessages": true,
"launchBrowser": false, "launchBrowser": false,
"applicationUrl": "http://localhost:5280", "applicationUrl": "http://localhost:5233",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "https://localhost:7042;http://localhost:5280",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }