Comments (5)
IMHO Docker has never done a good job with volume attachments and non-root container execution. If you test with this, I'm guessing you'll find the volume's directory is owned/writable by root:
docker run -it -v ~/data_bungee:/server --user $(id -u) --rm --entrypoint bash itzg/bungeecord -c "ls -al /server"
itzg/minecraft-server
works because I have the startup script jump through hoops to adapt to the user and file ownership:
https://github.com/itzg/docker-minecraft-server/blob/master/start#L8-L37
If you really want a non-root user within the container, then you'll need to modify the file ownership of your host directory ~/data_bungee
to match $(id -u)
.
from docker-bungeecord.
Even when changing the ownership of the host file, curl still returns the same error. The solution I found is to manually download Bungeecord.jar and launch the container.
Do you think you can implement the same script as in itzg/minecraft-server
?
from docker-bungeecord.
Can you provide the output of
docker run -it -v ~/data_bungee:/server --user $(id -u) --rm --entrypoint bash itzg/bungeecord -c "ls -al /server"
Without confirming the scenario Iām not sure that the same entry point solution would work.
from docker-bungeecord.
iverly@docker-1:~$ mkdir data_bungee/
iverly@docker-1:~$ docker run -it -v ~/data_bungee:/server --user $(id -u) --rm --entrypoint bash itzg/bungeecord -c "ls -al /server"
total 8
drwxr-xr-x 2 1001 1002 4096 Apr 28 08:08 .
drwxr-xr-x 1 root root 4096 Apr 28 08:08 ..
from docker-bungeecord.
I finally got a chance to debug this, but I haven't been able to recreate it.
I added a user:
sudo useradd mc
$ id mc
uid=1001(mc) gid=1002(mc) groups=1002(mc)
Made a directory and changed ownership
mkdir ~/mc-data
sudo chown -R mc: mc-data
and started bungeecord
$ docker run -it -v ~/mc-data:/server --user 1001 itzg/bungeecord
Resolving type given BUNGEECORD
Downloading https://ci.md-5.net/job/BungeeCord/lastStableBuild/artifact/bootstrap/target/BungeeCord.jar
Setting initial memory to 512m and max to 512m
14:56:14 [INFO] Using mbed TLS based native cipher.
14:56:14 [INFO] Using zlib based native compressor.
14:56:14 [INFO] Enabled BungeeCord version git:BungeeCord-Bootstrap:1.15-SNAPSHOT:b85df4f:1495
14:56:14 [INFO] Not on Windows, attempting to use enhanced EpollEventLoop
14:56:14 [INFO] Epoll is working, utilising it!
.
.
.
Files have expected ownership
$ ls -aln ~/mc-data
total 10568
drwxr-xr-x 4 1001 1002 4096 May 2 09:56 .
drwxr-xr-x 8 1000 1000 4096 May 2 09:54 ..
-rw-r--r-- 1 1001 0 10785372 May 2 09:56 BungeeCord-lastStableBuild.jar
-rw-r--r-- 1 1001 0 1095 May 2 09:56 config.yml
-rw-r--r-- 1 1001 0 3 May 2 09:56 locations.yml
drwxr-xr-x 2 1001 0 4096 May 2 09:56 modules
-rw-r--r-- 1 1001 0 155 May 2 09:56 modules.yml
drwxr-xr-x 2 1001 0 4096 May 2 09:56 plugins
-rw-r--r-- 1 1001 0 3935 May 2 09:56 proxy.log.0
It might be something about your networking. You can debug that same download operation it is doing by exec'ing into the container and running the curl:
docker run -it --rm --entrypoint bash itzg/bungeecord
curl -o /tmp/bungee.jar -v https://ci.md-5.net/job/BungeeCord/lastStableBuild/artifact/bootstrap/target/BungeeCord.jar
from docker-bungeecord.
Related Issues (20)
- bungeecord Type Velocity, can't connect to RCON CLI. Throws i/o timeout HOT 2
- Support GID, UID HOT 2
- Health status HOT 5
- SPIGET_PLUGINS not following redirects to Bukkit download page. HOT 6
- No response from RCON-CLI HOT 4
- Modrinth Plugin Support HOT 1
- RCON environment variables don't get into the config file HOT 1
- Support mounting kubernetes secrets HOT 8
- query port not exposed (udp) HOT 3
- Unable to mount velocity.toml into the container HOT 9
- [Server thread/ERROR]: Failed to validate profile key: Invalid signature for profile public key. HOT 2
- Healthcheck: "server not ready" HOT 2
- Copying plugin configs HOT 2
- Add support for config patching
- Request: Script similar to mc-send-to-console HOT 4
- Support more Java version HOT 3
- When specifying modrinth plugins on velocity the logs output that plugins are downlaoding but no plugins get loaded HOT 1
- Support 1.20.3 change to ping description structure
- Apply patches after related config file is created HOT 1
- Question : Using auto pause in docker-minecraft-server with docker-bungeecord and Velocity 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-bungeecord.