mirror of
https://github.com/mthenw/frontail.git
synced 2026-04-26 10:15:52 +03:00
[GH-ISSUE #112] Docker image doesn't support ENV variables #80
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/frontail#80
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @paskal on GitHub (Feb 16, 2018).
Original GitHub issue: https://github.com/mthenw/frontail/issues/112
Hello, $subj.
Work with such images from docker-compose is a pain;(
Here is an example of image which use ENV variables and doesn't require to add
commandto run:https://github.com/siomiz/SoftEtherVPN
Here is one of the variables from it:
How do I use it:
I've spent two hours trying to make your image work with .env file (passing variables as
command) but didn't had any luck with it. Would you be so kind to write an entrypoint for your image which will check if variables are set, and pass them if they are?@mthenw commented on GitHub (Feb 16, 2018):
Hey,
can you make a PR?
@mthenw commented on GitHub (Feb 16, 2018):
Docker file is located here: https://github.com/mthenw/docker-frontail
@paskal commented on GitHub (Feb 16, 2018):
I'll give it a shot. If you don't mind, I prefer to move docker file here (there is no need for separate repo) and I could suggest you how to set up autobuild every time you push a new tag.
@mthenw commented on GitHub (Feb 16, 2018):
It's already setup there. Please make it there and I will move it afterwards.
@paskal commented on GitHub (Feb 24, 2018):
I'm stuck:) In Go world we just read env variables in program:
long:"pinszie" env:"PIN_SIZE" default:"5" description:"pin size"In this example, if PIN_SIZE is set, it will be used (if nothing passed as parameter to command itself).
entrypoint.shI've linked initially doesn't seem to be a standard, it's a huge hack which couldn't be taken from projects I know as-is - it's highly customized bash code. The general idea here could be to parse environment variables, and construct input parameters string to your application in right order. It's possible to do but kind of ugly when you have full control on application source code.Could you please check if there is a way in your application to use environment variables without some script passing them to it? I don't know how hard it will be, but I'm sure that's the right way to accomplish proper Docker integration.
@mthenw commented on GitHub (Mar 14, 2018):
What exactly you would like to pass as env var?
@paskal commented on GitHub (Mar 14, 2018):
Basically everything what could be passed as args, all options plus filepath itself.
@mthenw commented on GitHub (Mar 14, 2018):
OK, so I didn't understand your original request. I think this change should be done in frontail itself, not in docker image. Or you can just simply create your own docker image doing that.
@paskal commented on GitHub (Mar 14, 2018):
Yes, that's right - change should be done in frontail itself. Doing this in separate shell script inside docker is possible but ugly - I've stopped trying when understood what it will be wrong to do so.
@timdonovanuk commented on GitHub (Jun 3, 2020):
Not sure why closed, I can't see that env vars are supported. The original request was badly described, but usualy docker containers can be started with env vars such as:
rather than passing a --comand. So env vars that map to options available would be great!
@timdonovanuk commented on GitHub (Jun 3, 2020):
Or support for a config_file.yaml :)