You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sql.Open("postgres", ...) fails with sql: unknown driver "postgres" (forgotten import?), causing the container to never listen on the port. This leads to curl: (52) Empty reply from server and no helpful logs unless the user explicitly adds logging in the retry loop.
Is this a docs issue?
Type of issue
Information is incorrect
Description
In the Use containers for Go development tutorial, the code sample omits the explicit import for the PostgreSQL driver. Without:
sql.Open("postgres", ...)
fails withsql: unknown driver "postgres" (forgotten import?)
, causing the container to never listen on the port. This leads tocurl: (52) Empty reply from server
and no helpful logs unless the user explicitly adds logging in the retry loop.Location
https://docs.docker.com/guides/golang/develop/
Suggestion
Either
_ "github.com/lib/pq"
must be used when connecting to PostgreSQL or CockroachDB.Thank you for your work on the docs.
The text was updated successfully, but these errors were encountered: