Comments (5)
The variable name prefix is important:
By default, for security reasons, it will only access variables that have a name that starts with "CFG_".
from docker-minecraft-server.
I have to apologize for missing that crucial line in the wiki. That explains my struggles, thanks! Changing REPLACE_ENV_VARIABLE_PREFIX
to _
and prefixing every variable worked perfectly. Although curly braces as in ${VAR_NAME}
seem to be required as stated in the wiki ($VAR_NAME
does not work).
If I understand the good intention behind the required prefix correctly - somebody could push a malicious mod / plugin update that scans for secrets in environment variables and steal them otherwise?
Is that the reason you can not disable this? Setting REPLACE_ENV_VARIABLE_PREFIX
to the empty string doesn't seem to work.
from docker-minecraft-server.
I have to apologize for missing that crucial line in the wiki. That explains my struggles, thanks! Changing
REPLACE_ENV_VARIABLE_PREFIX
to_
and prefixing every variable worked perfectly. Although curly braces as in${VAR_NAME}
seem to be required as stated in the wiki ($VAR_NAME
does not work).If I understand the good intention behind the required prefix correctly - somebody could push a malicious mod / plugin update that scans for secrets in environment variables and steal them otherwise?
Correct.
Is that the reason you can not disable this? Setting
REPLACE_ENV_VARIABLE_PREFIX
to the empty string doesn't seem to work.
I just tested and setting to empty string disables the prefix as documented:
I created a config/test.cfg
file that contained
eula=${EULA}
and used the compose file
services:
mc:
image: itzg/minecraft-server
environment:
REPLACE_ENV_VARIABLE_PREFIX: ""
EULA: true
volumes:
- ./config:/config
- ./data:/data
and the file data/config/test.cfg
now contains
eula=true
from docker-minecraft-server.
I have to correct, that works exactly as expected.
Is that the reason you can not disable this? Setting
REPLACE_ENV_VARIABLE_PREFIX
to the empty string doesn't seem to work.
Before writing this I tested it with my setup multiple times to no avail - but now it works fine.
The only thing I can assume is that there were external factors like Portainer not correctly mapping my stack environment variables. I assume this because the only variables not replaced in my test.cfg
are those that have no value. Maybe that was the issue.
Nevertheless, this is resolved for me. I'm still baffled. Sorry for wasting your time.
from docker-minecraft-server.
Closing this issue. I made some mistake somewhere.
REPLACE_ENV_VARIABLE_PREFIX
decides which variables are replaced. The default value is CFG_
meaning only variables like CFG_VAR_1
are replaced. Setting REPLACE_ENV_VARIABLE_PREFIX
to the empty string makes docker-minecraft-server replace every variable.
from docker-minecraft-server.
Related Issues (20)
- Change default of EXISTING_OPS|WHITELIST_FILE to SYNCHRONIZE
- NeoForge in Curse Forge modpacks HOT 4
- NeoForge installer fails with "expected at least three parts" when trying 1.21
- setting LEVEL to an absolute path causes WORLD (existing world copy) to break
- Automatic Update of Server-Icon on Container Restart HOT 3
- For PLUGINS and MODS list support GitHub and Jenkins resolving HOT 3
- Auto CurseForge HOT 2
- ERROR failed to auto-install CurseForge modpack HOT 3
- Can not connect HOT 5
- "Unable to resolve slug into ID (no matches)" HOT 8
- Bukkit download changed HOT 3
- Modrinth Local Pack Error
- Forge crash on launch HOT 2
- Unable to auto download mods with brackets in their file names HOT 13
- docker-compose data not storing on local maching HOT 6
- Unable to use the Send-Command flag HOT 1
- Container is failing to download "paper" HOT 4
- `mc-image-helper` fails when both `WHITELIST` and `EXISTING_WHITELIST_FILE: SYNCHRONIZE` is set HOT 2
- container crashes when TYPE=AUTO_CURSEFORGE HOT 5
- Plugin not recognizing Fabric HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-minecraft-server.