Skip to content

Startup Error when Environment Configuration contains Whitespaces #358

@FabioWidmer

Description

@FabioWidmer

Support guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

When environment variables used in 13-config-anonaddy.sh are set, special characters like whitespaces are preventing the server from starting.

Expected behaviour

Using a whitespace in the config even when escaping shouldn't prevent the server from starting.

Example: APP_NAME="Test Test"

Actual behaviour

The server doesn't start as the .env config cannot be read.

Steps to reproduce

  1. Set APP_NAME to something with a whitespace
  2. Try to start the container

Docker info

Client: Docker Engine - Community
 Version:    28.4.0
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.28.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.39.4
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Docker Compose config

Logs

server-1      | [cont-init.d] 15-config-postfix.sh: exited 0.
server-1      | [cont-init.d] 50-svc-main.sh: executing... 
server-1      | DB migration
server-1      | The environment file is invalid!
server-1      | Failed to parse dotenv file. Encountered unexpected whitespace at [Test Test].
server-1      | [cont-init.d] 50-svc-main.sh: exited 1.
server-1      | [cont-finish.d] executing container finish scripts...
server-1      | [cont-finish.d] done.

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions