Skip to content

Docker run not working as expected #43

@unidoct

Description

@unidoct

I have a Dockerfile which consists of:

ENTRYPOINT [ "/secrets-init", "--provider=google"]
CMD ["php-fpm"]

If I am using my Dockerfile in relation with docker compose it works as expected and variables are being replaced.
Commands like docker compose run test sh -c "echo \$TEST " show the replaced variable.
But when I am using the same image and I use docker run --env-file=.env ... test sh -c "echo \$TEST" , it doesn't show the replaced variable. I'd expect them to behave the same, but there must be a difference regarding the environment. Authentication with Google is working for both commands. Can't I use /secrets-init with docker run ...?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions