Skip to content

Environment variables are not passed when using Dockerfile #2207

@MuhammadM1998

Description

@MuhammadM1998

To Reproduce

  • Create a new project with the below Dockerfile and select Dockerfile as Build Type

    FROM node:alpine AS base
    
    # Log all env variables
    RUN env | sort 
  • Add any env vars by clicking the "Environment" tab and entering them in "Environment Settings"

    Image
  • Build the project, go to the "Deployments" tab, and click on "View"

    Image

Current vs. Expected behavior

Expected Results

The entered variables should show up in the logs

Actual Results

They don't. The "TEST_FOO" we added doesn't show up.

Image

Provide environment information

OS: Ubuntu 24.04
Dokploy Version: latest (0.24.3)

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

Application

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

Same server where Dokploy is installed

Additional context

No response

Will you send a PR to fix it?

Maybe, need help

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