Skip to content

Add support for passing --env-file to docker-sync start (using ENV file with/from different name or location) #830

Open
@oliveratgithub

Description

@oliveratgithub

Feature Request

The Docker run CLI allows to pass a different path for the ENV file to use. Also helpful if it's name is not the default expected ".env":

Set environment variables (-e, --env, --env-file):

% docker run -e MYVAR1 --env MYVAR2=foo --env-file ./env.list ubuntu bash

from https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file

Can this also be supported by docker-sync in order to use the same custom ENVs in docker-sync configs?


Docker Driver

Docker for Mac

Sync strategy

all

your docker-sync.yml

Irrelevant for request - but here's my project's Docker files structure:

/my-project/
    |_ Docker/
          |_ .env.docker
          |_ docker-compose.yml
          |_ docker-sync.yml
          |_ README.md
    |_ app/
    |_ public/
    |_ other stuff…

OS

macOS Ventura 13.1 (22C65)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions