Graphql Engine Docker Image
Hasura提供基于Postgres的极速即时GraphQL API,并支持细粒度访问控制。
Important notice
On 7th Dec 2022 10:00 AM PST, Hasura removed certain images that were impacted by a security vulnerability from this repository to prevent them being run in production. We encourage anyone who is impacted update to a patched version immediately.
More details can be found on this security advisory: https://github.com/hasura/graphql-engine/security/advisories/GHSA-g7mj-g7f4-hgrg
| Affected versions | Patched version |
|---|---|
| v2.15.1, v2.15.0 | v2.15.2 |
| v2.14.0 | v2.14.1 |
| v2.13.1, v2.13.0 | v2.13.2 |
| v2.12.0 | v2.12.1 |
| v2.11.2, v2.11.1, v2.11.0 | v2.11.3 |
| v2.10.1, v2.10.0 | v2.10.2 |
Supported tags
<version>,latest<version>.cli-migrations-v2,latest.cli-migrations-v2,<version>.cli-migrations-v3,latest.cli-migrations-v3
Quick reference
- Where to get help: the Hasura *** Server or https://stackoverflow.com/questions/tagged/hasura
- Where to file issues: https://github.com/hasura/graphql-engine
- Supported architectures:
amd64,arm64 - Where are the docs: [***]
What is Hasura?
Hasura GraphQL Engine is a blazing-fast GraphQL server that gives you instant, realtime GraphQL APIs over Postgres, with webhook triggers on database events, and remote schemas for business logic.
Hasura helps you build GraphQL apps backed by Postgres or incrementally move to GraphQL for existing applications using Postgres.
Read more at hasura.io and the docs.
How to use this image
Postgres is a dependency to run Hasura. See instructions for running Postgres at https://hub.docker.com/_/postgres.
Start a Hasura instance
bashdocker run -d -p 8080:8080 \ -e HASURA_GRAPHQL_DATABASE_URL=postgres://username:password@hostname:port/dbname \ -e HASURA_GRAPHQL_ENABLE_CONSOLE=true \ hasura/graphql-engine:latest
Hasura Console will be available at http://localhost:8080.
Examples of HASURA_GRAPHQL_DATABASE_URL:
postgres://admin:password@localhost:5432/my-dbpostgres://admin:@localhost:5432/my-db(if there is no password)
Note:
- If your password contains special characters (e.g.
#,%, `# Important notice
On 7th Dec 2022 10:00 AM PST, Hasura removed certain images that were impacted by a security vulnerability from this repository to prevent them being run in production. We encourage anyone who is impacted update to a patched version immediately.
More details can be found on this security advisory: https://github.com/hasura/graphql-engine/security/advisories/GHSA-g7mj-g7f4-hgrg
| Affected versions | Patched version |
|---|---|
| v2.15.1, v2.15.0 | v2.15.2 |
| v2.14.0 | v2.14.1 |
| v2.13.1, v2.13.0 | v2.13.2 |
| v2.12.0 | v2.12.1 |
| v2.11.2, v2.11.1, v2.11.0 | v2.11.3 |
| v2.10.1, v2.10.0 | v2.10.2 |
Supported tags
<version>,latest<version>.cli-migrations-v2,latest.cli-migrations-v2,<version>.cli-migrations-v3,latest.cli-migrations-v3
Quick reference
- Where to get help: the Hasura *** Server or https://stackoverflow.com/questions/tagged/hasura
- Where to file issues: https://github.com/hasura/graphql-engine
- Supported architectures:
amd64,arm64 - Where are the docs: [***]
What is Hasura?
Hasura GraphQL Engine is a blazing-fast GraphQL server that gives you instant, realtime GraphQL APIs over Postgres, with webhook triggers on database events, and remote schemas for business logic.
Hasura helps you build GraphQL apps backed by Postgres or incrementally move to GraphQL for existing applications using Postgres.
Read more at hasura.io and the docs.
How to use this image
Postgres is a dependency to run Hasura. See instructions for running Postgres at https://hub.docker.com/_/postgres.
Start a Hasura instance
bashdocker run -d -p 8080:8080 \ -e HASURA_GRAPHQL_DATABASE_URL=postgres://username:password@hostname:port/dbname \ -e HASURA_GRAPHQL_ENABLE_CONSOLE=true \ hasura/graphql-engine:latest
Hasura Console will be available at http://localhost:8080.
Examples of HASURA_GRAPHQL_DATABASE_URL:
postgres://admin:password@localhost:5432/my-dbpostgres://admin:@localhost:5432/my-db(if there is no password)
Note:
- If your password contains special characters (e.g.
#,%, ,@, etc.), you might need to URL encode them in theHASURA_GRAPHQL_DATABASE_URLenv var (e.g.%40for@). - You can check the logs to see if the database credentials are proper and if Hasura is able to connect to the database.
- Hasura GraphQL engine needs access permissions to your Postgres database as described in Postgres permissions.
- The Hasura GraphQL Engine collects anonymous telemetry to understand usage and provide the best experience. Read more here on what data is collected and the procedure to opt out.
Network config
If your Postgres instance is running on localhost, the following changes will be needed to the docker run command to allow the Docker container to access the host’s network:
Linux
Add the --net=host flag to access the host’s Postgres service.
bashdocker run -d --net=host \ -e HASURA_GRAPHQL_DATABASE_URL=postgres://username:password@hostname:port/dbname \ -e HASURA_GRAPHQL_ENABLE_CONSOLE=true \ hasura/graphql-engine:latest
Docker for Mac and Windows
Use host.docker.internal as the hostname to access the host’s Postgres service.
bashdocker run -d -p 8080:8080 \ -e HASURA_GRAPHQL_DATABASE_URL=postgres://username:password@host.docker.internal:port/dbname \ -e HASURA_GRAPHQL_ENABLE_CONSOLE=true \ hasura/graphql-engine:latest
Using docker-compose
Example docker-compose.yaml for hasura and postgres:
yamlversion: '3.6' services: postgres: image: postgres restart: always volumes: - db_data:/var/lib/postgresql/data graphql-engine: image: hasura/graphql-engine:v1.0.0-beta.6 ports: - "8080:8080" depends_on: - "postgres" restart: always environment: HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:@postgres:5432/postgres HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console ## uncomment next line to set an admin secret # HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey volumes: db_data:
Run docker-compose up, wait for it to initialize completely and visit http://host-ip:8080 or http://localhost:8080 to open the Hasura Console.
License
The hasura/graphql-engine image includes both open-source and proprietary components. The open source portions are licensed under the https://www.apache.org/licenses/LICENSE-2.0. The proprietary components include features for Hasura Enterprise and are enabled with a license key provided by Hasura. If you would like to use an image with only the open source components, please use Docker images on https://hub.docker.com/r/hasura/graphql-engine/tags?page=1&name=-ce that end with -ce. (example: hasura/graphql-engine:<VERSION>-ce)
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
轩辕镜像加速拉取命令点我查看更多 graphql-engine 镜像标签
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务