Coder Social home page Coder Social logo

docker_factorio's Introduction

Factorio headless server.

So this isn't ideal, but it works. Then again, that's true with everything. The only thing I've noticed that is weird is that the first time the thing comes up, it can take a few connection attempts to connect. There's also some weird path stuff going on with the upstream binary so for whatever reason, you need to call the entire path to the binary.

This has a web interface that allows for basic server control. You'll need to set the environmental variables of FP_USERNAME and FP_PASSWORD.

Quickstart

docker-compose up

Running the pre-built container from Docker hub

You'll need a savegame in a volume or this can create one for you, it's automatic, don't worry about it. This is the way the game works, not something I chose. You also have to run it in bridge mode because of the way the p2p networking works.

Also I'm assuming you're going to want to use a volume mount, otherwise upgrading this guy is awful and requires launching more containers to copy the savegame out, etc.

Creating the savegame and launching the server:

$ docker run --name factorio -net bridge -p 80:80 -p 34197:34197/udp -v /opt/factorio/saves:/opt/factorio/saves skord/factorio:0.12.29

Upgrading is easy. Just remove the named container and bump the version. Version not actually bumped in this example.

$ docker stop factorio && docker rm factorio
$ docker run --name factorio -net bridge -p 80:80 -p 34197:34197/udp -v /opt/factorio/saves:/opt/factorio/saves skord/factorio:0.12.29

Just bump the docker tag when I release new containers.

Building it on your own

There's a Rakefile that will build and publish this. Just change the string in the VERSION file to what you want it to be and run "rake tag" if you intend on just running it locally. Otherwise if you want to push it to a registry, you'll need to change my name for yours, then run rake publish.

Quick server task

Want to run a quick server with no persistence really quickly? Run rake quick_server for a server and then connect to the IP (localhost or whereever your docker daemon runs). You will lose all your fun game time when you Ctrl-C to quit.

The Web UI.

You can install mods by passing a URL into a form. Just go try it. Not yet implimented, getting rid of mods.

docker_factorio's People

Contributors

skord avatar

Stargazers

 avatar  avatar

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.