docker-minecraft-server
                                
                                 docker-minecraft-server copied to clipboard
                                
                                    docker-minecraft-server copied to clipboard
                            
                            
                            
                        Option to use lazymc
Enhancement Type
A completely new feature
Describe the enhancement
It would be great if this docker image could have lazymc as an option.
https://github.com/timvisee/lazymc
Conceptually that's a good idea and was also brought up here
https://github.com/itzg/docker-minecraft-server/issues/2115#issuecomment-1542810309
It would be difficult to retrofit that into the existing design, but will park it here in case I can think about it more.
I have something similar running with lazy_container.
version: "3"
services:
  lazytainer:
    container_name: lazytainer
    image: ghcr.io/vmorganp/lazytainer:master
    environment:
      - VERBOSE=false
    ports:
      - 25565:25565
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    labels:
      - lazytainer.group.minecraft.sleepMethod=stop
      - lazytainer.group.minecraft.ports=25565
      - lazytainer.group.minecraft.minPacketThreshold=2
      - lazytainer.group.minecraft.inactiveTimeout=600 # 10 minutes, to allow the server to bootstrap. You can probably make this lower later if you want.
    restart: unless-stopped
    network_mode: bridge
  mc:
    image: itzg/minecraft-server
    environment:
      - EULA=TRUE
      - TYPE=PURPUR
      - MEMORY=4G
      - TZ=Europe/Berlin
      - MOTD=From_9_till_22
      - OVERRIDE_SERVER_PROPERTIES=TRUE
    volumes:
      - /opt/container_volumes/minecraft/data:/data
    labels:
      - lazytainer.group=minecraft
    depends_on:
      - lazytainer
    network_mode: service:lazytainer
    tty: true
    stdin_open: true
    restart: unless-stopped
networks: {}
@nfroeschl that would be a great section for https://github.com/itzg/docker-minecraft-server/blob/master/docs/misc/examples.md if you want to PR that.
Hello @savdbroek and @itzg, I know this issue is closed but I have found a way to get lazymc to work with the container, similar to how lazytainer works. Instead of wrapping the server jar in the lazytainer jar, you can pass a custom run command to lazymc, I leveraged this to execute docker start on the minecraft server container. It operated completely seperatly to the minecraft container, in a very similar way to lazytainer. It took a bit of fanageling to work but it works, and quite well.
See it here: https://github.com/joesturge/lazymc-docker-proxy
perhaps, we could ship an image like this to work alongside the itzg container? Let me know what you think
@joesturge very cool. By all means go ahead and get that image going. You can PR a section in the examples along with the lazytainer approach.
@itzg https://github.com/itzg/docker-minecraft-server/pull/3017