Azure-Samples / azure-django-postgres-flexible-aca

Web app using Python Django backend, set up for deployment to Azure Container Apps with Azure PostgreSQL Flexible Server.
MIT License
17 stars 31 forks source link

Failed to build service in Dev Container #69

Open v-jiaodi opened 1 year ago

v-jiaodi commented 1 year ago

Describe the issue: When running azd up in Dev Container, get error as follow: image

Repro Steps:

  1. Clone the repo to local and reopen with Dev Container.
  2. Run azd auth login.
  3. Run azd up

Environment:

Expected behavior: Run azd up can pass in Dev Container.

@pamelafox for notification.

pamelafox commented 1 year ago

Hm, that error looks like the kind of error that happens when starting a dev container, since it's referencing the dev container Dockerfile. Are you sure it happened when running "azd up"?

v-jiaodi commented 1 year ago

@pamelafox I am sure that for the aca template, azd up will first perform azd package, and at this time, Dockerfile(src/Dockerfile) will also be used.

pamelafox commented 1 year ago

Ah right you are! I forgot we installed postgresql-client in src/Dockerfile as well. That error message says there was a temporary name resolution with the Debian packages server, so it wasn't able to find any of those packages. Have you tried again to see if that error is resolved? I sometimes have DNS/Internet connection issues when pulling packages and images down.

v-jiaodi commented 1 year ago

@pamelafox I tried multiple times and still get the same error in Dev Container(Windows). The error displayed on Dev Container(Mac) is just like what you mentioned above DNS/Internet connection issues. image

kjaymiller commented 1 year ago

I was not able to reproduce this error in recent updates via CodeSpace.

@pamelafox - were you able to reproduce in a local dev container?

pamelafox commented 1 year ago

No, I didn't replicate in a dev container on M1. Is it possible that your machine has different networking constraints? I ask that because of the errors with DNS/TCP lookups.