Skip to content

Unable to parse environment variable value with space #4137

@rgdcastro

Description

@rgdcastro

To Reproduce

  1. Create a service using Dockerfile as build type
  2. Define an environment variable like SOME_ENV="This env has a space"
  3. Deploy

You will get an error saying Failed to parse dotenv file. Encountered unexpected whitespace at [This env has a space].

Usually on other projects or platforms, you just enclose the value in quotes but that doesn't seem to work.

Current vs. Expected behavior

Current: Deployment fails
Expected: Deployment is successful

Provide environment information

Operating System:
  OS: Ubuntu 24.04
  Arch: arm64
Dokploy version: 0.28.8
VPS Provider: AWS
What applications/services are you tying to deploy?
Laravel

Which area(s) are affected? (Select all that apply)

Application

Are you deploying the applications where Dokploy is installed or on a remote server?

Remote server

Additional context

No response

Will you send a PR to fix it?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions