Coder Social home page Coder Social logo

imagegenius / docker-amp Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 3.0 1.24 MB

CubeCoders AMP in a minimal docker container

Home Page: https://hub.docker.com/r/imagegenius/amp

License: GNU General Public License v3.0

Dockerfile 100.00%
docker minimal s6-overlay amp cubecoders minecraft game-servers alpine ubuntu

docker-amp's People

Contributors

gitpappy avatar hydazz avatar imagegeniusci avatar rekonnected avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

docker-amp's Issues

Unable to deploy template on Unraid

When attempting to deploy the container via Community Apps on Unraid I receive the following output

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='amp' --net='proxynet' -e TZ="America/Chicago" -e HOST_OS="Unraid" -e HOST_HOSTNAME="MediaCenter" -e HOST_CONTAINERNAME="amp" -e 'USERNAME'='admin' -e 'PASSWORD'='admin' -e 'LICENCE'='License-Key-Task' -e 'JAVA_VERSIONS'='7,9,13' -e 'MODULE'='ADS' -e 'PUID'='99' -e 'PGID'='100' -e 'UMASK'='022' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:8080]' -l net.unraid.docker.icon='https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/amp.png' -p '8090:8080/tcp' -p '25567:25565/tcp' -v '/mnt/user/appdata/amp':'/config':'rw' --mac-address=00:00:00:00:00:00 'ghcr.io/imagegenius/amp'
5e67171c0b5bb648f6836f3c20ed8cb44ad220966e1750e0bec63b727f14dc2c
docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: exit status 1, stdout: , stderr: time="2023-01-24T19:50:30-06:00" level=fatal msg="failed to add interface veth0e6a328 to sandbox: error setting interface "veth0e6a328" MAC to "00:00:00:00:00:00": cannot assign requested address": unknown.

The command failed.

Add --stop-timeout to the run command

As described here https://docs-stage.docker.com/engine/reference/commandline/run/#stop-timeout it is possible to add --stop-timeout to define a custom timeout for the docker container, that "overrides" the default 10 seconds.

Some extra information on how this got implemented in other projects is found here https://youtrack.jetbrains.com/issue/JT-61434

This should fix the problem described here https://github.com/imagegenius/docker-amp#application-setup when the container receives the stop signal. Though i am not sure, if --stop-signal is needed and what it should be set to ( i guess it needs to be SIGTERM as thats the signal that is handled internally in the docker container).

So to sum this up, an adjusted docker run command should look like this:

docker run -d \
  --name=amp \
  --mac-address=00:00:00:00:00:00 \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e USERNAME=admin \
  -e PASSWORD=admin \
  -e LICENCE=00000000-0000-0000-0000-000000000000 \
  -e JAVA_VERSIONS=7,9,13 `#optional` \
  -e MODULE=ADS `#optional` \
  -p 8080:8080 \
  -p 25565:25565 `#optional` \
  -v path_to_appdata:/config \
  --restart unless-stopped \
  --stop-timeout=60 \
  --stop-signal=SIGTERM \
  ghcr.io/imagegenius/amp:latest

Stop timeout should be high enough with 60 seconds to gracefully shutdown all running instances, but it could also be decreased to 45 or even 30 seconds

Java not installed

AMP reports java not installed for Minecraft

I've supplied the docker config with multiple versions.

Installing versions of java: openjdk17-jre openjdk13-jre openjdk9-jre openjdk8-jre openjdk7-jre
[custom-init] No custom files found, skipping...
[Info] AMP Instance Manager v2.4.1.2 built 21/12/2022 17:55
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] Waiting for AMP instance to start...
[Notice] AMP instance Main is now running.

'java' is not installed, or not available in PATH. Please make sure Java 8 is installed on your system. If you have just installed Java then you will need to restart AMP.

Temperamental `:latest`

s6-rc: info: service init-adduser: starting
s6-rc: info: service init-envfile successfully started
s6-rc: info: service init-adduser successfully started
s6-rc: info: service init-os-end: starting
s6-rc: info: service init-os-end successfully started
s6-rc: info: service init-config: starting
s6-rc: info: service init-config successfully started
s6-rc: info: service init-check-variables: starting
s6-rc: info: service init-check-variables successfully started
s6-rc: info: service init-config-amp: starting

=================================================================
        External Debugger Dump:
=================================================================
mono_gdb_render_native_backtraces not supported on this platform, unable to find gdb or lldb
s6-rc: info: service init-config-amp successfully started
s6-rc: info: service init-config-java: starting

╔═══════════════════════════════╗
       __  _____ _____       __
      / / |_   _/ ____|     / /
     / /    | || |  __     / /
    / /     | || | |_ |   / /
   / /     _| || |__| |  / /
  /_/     |_____\_____| /_/

  Baseimage from linuxserver.io
╠═══════════════════════════════╣
  User/Group ID:
  User UID: 99
  User GID: 100
╚═══════════════════════════════╝
[Info] AMP Instance Manager v2.4.3.6 built 07/05/2023 12:05
[Info] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] Testing internet connection...
[Info] Checking licence key...
[Info] Licence Type:  AMP Professional
[Info] Current Usage: 1
[Info] Creating Instance: 'Main'
[Info] Performing Step: Creating Environment
[Activity] Audit: Unknown/None [CreateInstance] Created instance Main using ADS module on port 8080.
[Info] Performing Step: Downloading AMP
[Info] Using cached archive: /config/.ampdata/instances/AMPCache-Mainline-2440.zip
[Info] Performing Step: Unpacking
[Info] Performing Step: Configuring AMP

=================================================================
        Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
        Native stacktrace:
=================================================================
        0x4b158b - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 
        0x4b1919 - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 
        0x45debf - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 
        0x42b7cd - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 
        0x1550655adfc0 - /usr/glibc-compat/lib/libc.so.6 : 
        0x4ad18f - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 
        0x46308d - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 
        0x425c77 - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 
        0x6181af - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 
        0x61b5ef - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 
        0x57d53b - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 
        0x42d7e9 - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 
        0x4337df - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : mono_main
        0x4241e9 - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 
        0x155065598b90 - /usr/glibc-compat/lib/libc.so.6 : 
        0x155065598c40 - /usr/glibc-compat/lib/libc.so.6 : __libc_start_main
        0x4247ba - /config/.ampdata/instances/Main/AMP_Linux_x86_64 : 

=================================================================
        Telemetry Dumper:
=================================================================
No threads attached to runtime.

=================================================================
        Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x4ad18f):0x4ad17f  83 c2 01 48 83 fa 01 0f 87 c1 00 00 00 83 e8 05  ...H............
0x4ad18f  c6 03 e8 0f b6 d4 88 43 01 88 53 02 89 c2 c1 e8  .......C..S.....
0x4ad19f  18 c1 ea 10 48 85 ed 88 43 04 88 53 03 74 52 48  ....H...C..S.tRH
0x4ad1af  8d 6b 0e 49 63 c6 c6 43 05 08 4c 89 63 06 48 29  .k.Ic..C..L.c.H)
[Error] Configuration Failed: AMP configuration failed with return code 134
[Info] Instance creation failed. AMP configuration failed with return code 134
Installed openjdk7-jre
Installed openjdk9-jre
Installed openjdk13-jre
s6-rc: info: service init-config-java successfully started
s6-rc: info: service init-config-update: starting
s6-rc: info: service init-config-update successfully started
s6-rc: info: service init-config-end: starting
s6-rc: info: service init-config-end successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-custom-files: starting
[custom-init] No custom files found, skipping...
s6-rc: info: service init-custom-files successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service svc-amp: starting
s6-rc: info: service svc-amp successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
s6-rc: info: service ci-service-check: starting
[ig-init] done.

Unraid libstdc issue

Tried to installed on Unraid but getting this issue after install in the logs - any ideas on a fix?

[Info] AMP Instance Manager v2.5 built 13/03/2024 17:07
[Info] Stream: Mainline / Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] No AMP instances are currently set to start automatically on boot.
ampinstmgr: /usr/lib/libstdc++.so.6: no version information available (required by ampinstmgr)
ampinstmgr: /usr/lib/libstdc++.so.6: no version information available (required by ampinstmgr)
ampinstmgr: /usr/lib/libstdc++.so.6: no version information available (required by ampinstmgr)
ampinstmgr: /usr/lib/libstdc++.so.6: no version information available (required by ampinstmgr)
ampinstmgr: /usr/lib/libstdc++.so.6: no version information available (required by ampinstmgr)
ampinstmgr: /usr/lib/libstdc++.so.6: no version information available (required by ampinstmgr)
ampinstmgr: /usr/lib/libstdc++.so.6: no version information available (required by ampinstmgr)
ampinstmgr: /usr/lib/libstdc++.so.6: no version information available (required by ampinstmgr)
ampinstmgr: /usr/lib/libstdc++.so.6: no version information available (required by ampinstmgr)
ampinstmgr: /usr/lib/libstdc++.so.6: no version information available (required by ampinstmgr)
ampinstmgr: /usr/lib/libstdc++.so.6: no version information available (required by ampinstmgr)
ampinstmgr: /usr/lib/libstdc++.so.6: no version information available (required by ampinstmgr)
[Info] AMP Instance Manager v2.5 built 13/03/2024 17:07
[Info] Stream: Mainline / Release - built by CUBECODERS/buildbot on CCL-DEV
[Info] No AMP instances are currently set to start automatically on boot.

Java versions not downloading all the time and also bedrock server not running?

JAVA_VERSIONS: within the docker keeps messing up and not downloading them all the time they sometimes go missing and also creating a bedrock server creates this issue...

[01:06:09] /config/.ampdata/instances/Bedrock01/./Minecraft/bedrock_server: /usr/lib/libstdc++.so.6: no version information available (required by /config/.ampdata/instances/Bedrock01/./Minecraft/bedrock_server)
[01:06:09] /config/.ampdata/instances/Bedrock01/./Minecraft/bedrock_server: /usr/lib/libstdc++.so.6: no version information available (required by /config/.ampdata/instances/Bedrock01/./Minecraft/bedrock_server)
[01:06:09] /config/.ampdata/instances/Bedrock01/./Minecraft/bedrock_server: /usr/lib/libstdc++.so.6: no version information available (required by /config/.ampdata/instances/Bedrock01/./Minecraft/bedrock_server)
[01:06:09] /config/.ampdata/instances/Bedrock01/./Minecraft/bedrock_server: /usr/lib/libcurl.so.4: no version information available (required by /config/.ampdata/instances/Bedrock01/./Minecraft/bedrock_server)
[01:06:09] /config/.ampdata/instances/Bedrock01/./Minecraft/bedrock_server: Relink /lib/libz.so.1' with /usr/glibc-compat/lib/libc.so.6' for IFUNC symbol `memmove'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.