How do I create a docker from hub?


Recommended Posts

I want to use https://hub.docker.com/r/hugecannon/factorio/

 

But it doesn't appear to have a template for unraid.

 

So I turned on Docker Hub Searching in Community Applications and tried the auto create a template thing but that doesn't appear to have worked so I'm guessing I'll need to make the template myself. How would I do this?

 

From the readme...

 

docker run -d --name factorio -p "34197:34197/udp" -v "factorio_saves:/factorio/saves" hugecannon/factorio:latest --start-server mygame

 

So once Community Applications brings up the blank template

 

map port 34197 as UDP (NOT TCP)

 

and

 

/factorio/saves as /mnt/cache/appdata/factorio

 

Should get you started.  You may need to do some of the starting/copying etc from cmd line though reading the readme.

 

Also remember, just because something is on dockerhub, doesn't mean it works, with Unraid or anything else.  There's a fair amount of broken containers out there.

 

Link to comment

The last step created a template.  Looks like you need to create a game, so from cmd line run...

 

(Like it says in the readme)

 

docker run --rm -v "factorio_saves:/factorio/saves" hugecannon/factorio:latest --create mygame

 

Which would translate to

 

docker run --rm -v "/mnt/cache/appdata/factorio:/factorio/saves" hugecannon/factorio:latest --create mygame

 

Then to run

 

docker run -d --name factorio -p "34197:34197/udp" -v "/mnt/cache/appdata/factorio:/factorio/saves" hugecannon/factorio:latest --start-server mygame

 

I haven't managed to get it running using the templates yet.

Link to comment
0.000 2016-03-05 15:46:38; Factorio 0.12.25 (Build 17747, linux64)
0.130 Operating system: Linux (Ubuntu 14.04)
0.130 Program arguments: "/factorio/bin/x64/factorio" "--start-server" "mygame" 
0.130 Read data path: /factorio/data
0.130 Write data path: /factorio
0.130 Binaries path: /factorio/bin
0.137 Running in headless mode
0.138 Loading mod core 0.0.0 (data.lua)
0.140 Loading mod base 0.12.25 (data.lua)
0.371 Factorio initialised
0.372 Info Router.cpp:556: Router peerID(65535) shutting down.
0.372 Info Router.cpp:582: Router state -> Disconnected
0.372 Info MultiplayerManager.cpp:906: networkTick(0) mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
0.372 Info MultiplayerManager.cpp:906: networkTick(0) mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
0.372 Loading map /factorio/saves/mygame.zip
0.378 Info Scenario.cpp:124: Map version 0.12.25-0
0.392 Info MultiplayerManager.cpp:282: 0x2b4de4297620, (nil)
0.392 Info PosixUDPSocket.cpp:34: Opening socket at port 34197
0.393 Warning PosixUDPSocket.cpp:93: Failed to open IPv6 socket (Address family not supported by protocol), continuing with IPv4 only
0.393 Info Router.cpp:582: Router state -> Connected
0.393 Info Synchronizer.cpp:54: NetworkTick(0) initialized Synchronizer local peer(0) latency(6).
0.393 Hosting game at port 34197, peerID 0, session magic 2170
0.393 Info MultiplayerManager.cpp:304: 0x2b4de4297620, 0x2b4de4297620
0.393 Info MultiplayerManager.cpp:906: networkTick(0) mapTick(0) changing state from(CreatingGame) to(InGame)
0.393 Info NetworkInputHandler.cpp:40: mapTick(0) networkTick(0) initialized NetworkInputHandler local peer(0).
0.510 Info MultiplayerManager.cpp:1385: Received peer info for peer(0) username(<server>).
0.510 Info MultiplayerManager.cpp:1043: networkTick(6) mapTick(0) received stateChanged peerID(0) oldState(Ready) newState(CreatingGame)
0.510 Info MultiplayerManager.cpp:1043: networkTick(6) mapTick(0) received stateChanged peerID(0) oldState(CreatingGame) newState(InGame)

Link to comment

Yep, much easier to use....

 

###
# New map created [save.zip]
###
###
# Launching Game
###
0.000 2016-03-05 15:56:08; Factorio 0.12.25 (Build 17747, linux64)
0.030 Operating system: Linux (Ubuntu 14.04)
0.030 Program arguments: "/opt/factorio/bin/x64/factorio" "--disallow-commands" "--start-server" "save.zip" 
0.030 Read data path: /opt/factorio/data
0.030 Write data path: /opt/factorio
0.030 Binaries path: /opt/factorio/bin
0.036 Running in headless mode
0.037 Loading mod core 0.0.0 (data.lua)
0.039 Loading mod base 0.12.25 (data.lua)
0.272 Factorio initialised
0.272 Info Router.cpp:556: Router peerID(65535) shutting down.
0.273 Info Router.cpp:582: Router state -> Disconnected
0.273 Info MultiplayerManager.cpp:906: networkTick(0) mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
0.273 Info MultiplayerManager.cpp:906: networkTick(0) mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
0.273 Loading map /opt/factorio/saves/save.zip
0.279 Info Scenario.cpp:124: Map version 0.12.25-0
0.293 Info MultiplayerManager.cpp:282: 0x2ab6a8297230, (nil)
0.293 Info PosixUDPSocket.cpp:34: Opening socket at port 34197
0.294 Warning PosixUDPSocket.cpp:93: Failed to open IPv6 socket (Address family not supported by protocol), continuing with IPv4 only
0.294 Info Router.cpp:582: Router state -> Connected
0.294 Info Synchronizer.cpp:54: NetworkTick(0) initialized Synchronizer local peer(0) latency(6).
0.294 Hosting game at port 34197, peerID 0, session magic 1082
0.294 Info MultiplayerManager.cpp:304: 0x2ab6a8297230, 0x2ab6a8297230
0.294 Info MultiplayerManager.cpp:906: networkTick(0) mapTick(0) changing state from(CreatingGame) to(InGame)
0.294 Info NetworkInputHandler.cpp:40: mapTick(0) networkTick(0) initialized NetworkInputHandler local peer(0).
0.410 Info MultiplayerManager.cpp:1385: Received peer info for peer(0) username(<server>).
0.411 Info MultiplayerManager.cpp:1043: networkTick(6) mapTick(0) received stateChanged peerID(0) oldState(Ready) newState(CreatingGame)
0.411 Info MultiplayerManager.cpp:1043: networkTick(6) mapTick(0) received stateChanged peerID(0) oldState(CreatingGame) newState(InGame)

 

Just add it via Community Applications and map /opt/factorio/saves to /mnt/cache/appdata/factorio and you should be good...

Link to comment

Yep, much easier to use....

 

###
# New map created [save.zip]
###
###
# Launching Game
###
0.000 2016-03-05 15:56:08; Factorio 0.12.25 (Build 17747, linux64)
0.030 Operating system: Linux (Ubuntu 14.04)
0.030 Program arguments: "/opt/factorio/bin/x64/factorio" "--disallow-commands" "--start-server" "save.zip" 
0.030 Read data path: /opt/factorio/data
0.030 Write data path: /opt/factorio
0.030 Binaries path: /opt/factorio/bin
0.036 Running in headless mode
0.037 Loading mod core 0.0.0 (data.lua)
0.039 Loading mod base 0.12.25 (data.lua)
0.272 Factorio initialised
0.272 Info Router.cpp:556: Router peerID(65535) shutting down.
0.273 Info Router.cpp:582: Router state -> Disconnected
0.273 Info MultiplayerManager.cpp:906: networkTick(0) mapTick(-1) changing state from(Ready) to(PreparedToHostGame)
0.273 Info MultiplayerManager.cpp:906: networkTick(0) mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame)
0.273 Loading map /opt/factorio/saves/save.zip
0.279 Info Scenario.cpp:124: Map version 0.12.25-0
0.293 Info MultiplayerManager.cpp:282: 0x2ab6a8297230, (nil)
0.293 Info PosixUDPSocket.cpp:34: Opening socket at port 34197
0.294 Warning PosixUDPSocket.cpp:93: Failed to open IPv6 socket (Address family not supported by protocol), continuing with IPv4 only
0.294 Info Router.cpp:582: Router state -> Connected
0.294 Info Synchronizer.cpp:54: NetworkTick(0) initialized Synchronizer local peer(0) latency(6).
0.294 Hosting game at port 34197, peerID 0, session magic 1082
0.294 Info MultiplayerManager.cpp:304: 0x2ab6a8297230, 0x2ab6a8297230
0.294 Info MultiplayerManager.cpp:906: networkTick(0) mapTick(0) changing state from(CreatingGame) to(InGame)
0.294 Info NetworkInputHandler.cpp:40: mapTick(0) networkTick(0) initialized NetworkInputHandler local peer(0).
0.410 Info MultiplayerManager.cpp:1385: Received peer info for peer(0) username(<server>).
0.411 Info MultiplayerManager.cpp:1043: networkTick(6) mapTick(0) received stateChanged peerID(0) oldState(Ready) newState(CreatingGame)
0.411 Info MultiplayerManager.cpp:1043: networkTick(6) mapTick(0) received stateChanged peerID(0) oldState(CreatingGame) newState(InGame)

 

Just add it via Community Applications and map /opt/factorio/saves to /mnt/cache/appdata/factorio and you should be good...

 

Oh sick, I'll try that. Was about to try it via command line :P

Link to comment

Nothing wrong with the templates at all Squid, but the first one required setting up via command line and not passing the -d parameter iirc.  Then I couldn't work out how to get it to run the created map with the --server (or something like that) switch at then end.  Didn't work as an environmental variable or as a extra command.

Link to comment

I just did another using community apps and popped all the info in

 

9d7c5bbef2.png

 

including the variables as listed in https://hub.docker.com/r/turzam/zomboid/

 

but the server doesn't appear to be running and hasn't created any files... I tried to attach to the docker via command like but I just get a blinking cursor with no response. I'm guessing as it's a couple months old that this docker might just be out of date or broken.

 

Any ideas?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.