Skip to content

Frontend cannot to Render Inline Formulas When Using Docker Self-Host #27697

@Dave0126

Description

@Dave0126

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.9.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Related Issues and PRs

Issues Description

  • When starting the containers using the docker-compose.yaml file from the main branch, the web container pulls its image as defined in ./docker/docker-compose.yaml#L692
docker inspect langgenius/dify-web:1.9.2 
[
    {
        "Id": "sha256:f09fba9988fdaf623f9dc2902190120886da321c52a1d42ad8d9dfba811c6222",
        "RepoTags": [
            "langgenius/dify-web:1.9.2"
        ],
        "RepoDigests": [
            "langgenius/dify-web@sha256:f09fba9988fdaf623f9dc2902190120886da321c52a1d42ad8d9dfba811c6222"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2025-10-29T04:33:38.387546299Z",
        "DockerVersion": "",
        "Author": "",
        "Architecture": "arm64",
        "Os": "linux",
        "Size": 183017877,
...
  • According to PR #27070, the environment variable NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX was added to set whether inline formulas are rendered. Many thanks for this contribution.

  • However, in ./docker/docker-compose.yaml#L695-L716, this variable is not included — neither NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX nor *shared-api-worker-env is referenced. As a result, the configuration in .env does not take effect.

  • After I set the environment variable directly in the environment block as NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX: true, inline formulas still do not render correctly — see the screenshot below.

Image

✔️ Expected Behavior

The inline formula block should be rendered.

❌ Actual Behavior

    build:
      context: ../web
      dockerfile: Dockerfile
    image: custom-dify-web:1.9.2
Image

Suggested Actions:

  1. Please update the Docker image tagged as langgenius/dify-web:1.9.2.
  2. Include the environment variable NEXT_PUBLIC_ENABLE_SINGLE_DOLLAR_LATEX in ./docker/docker-compose.yaml#L695-L716.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions