mirror of
https://github.com/evennia/evennia.git
synced 2025-10-29 11:26:10 +00:00
Fix and clean up docker build doc
This commit is contained in:
parent
ad70e98717
commit
66f5c4ab20
@ -128,7 +128,7 @@ jobs:
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push for master
|
||||
if: matrix.TESTING_DB == 'sqlite3' && matrix.python-version == '3.10' && github.ref == 'refs/heads/master'
|
||||
if: matrix.TESTING_DB == 'sqlite3' && matrix.python-version == '3.9' && github.ref == 'refs/heads/master'
|
||||
id: docker_build_master
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
|
||||
@ -26,9 +26,9 @@
|
||||
#
|
||||
# The evennia/evennia base image is found on DockerHub and can also be used
|
||||
# as a base for creating your own custom containerized Evennia game. For more
|
||||
# info, see https://github.com/evennia/evennia/wiki/Running%20Evennia%20in%20Docker .
|
||||
# info, see https://evennia.com/docs/latest/Setup/Installation-Docker
|
||||
#
|
||||
FROM python:3.7-alpine
|
||||
FROM python:3.10-alpine
|
||||
|
||||
LABEL maintainer="www.evennia.com"
|
||||
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
# Running Evennia in Docker
|
||||
|
||||
Evennia has an [official docker image](https://hub.docker.com/r/evennia/evennia/) which makes
|
||||
running an Evennia-based game in a Docker container easy.
|
||||
|
||||
## Install Evennia through docker
|
||||
Evennia releases [docker images](https://hub.docker.com/r/evennia/evennia/) which makes
|
||||
running an Evennia-based game in a Docker container easy.
|
||||
|
||||
First, install the `docker` program so you can run the Evennia container. You can get it freely from
|
||||
[docker.com](https://www.docker.com/). Linux users can likely also get it through their normal
|
||||
@ -13,16 +11,17 @@ To fetch the latest evennia docker image, run:
|
||||
|
||||
docker pull evennia/evennia
|
||||
|
||||
This is a good command to know, it is also how you update to the latest version when we make updates
|
||||
in the future. This tracks the `master` branch of Evennia.
|
||||
This will get the latest stable image.
|
||||
|
||||
> Note: If you want to experiment with the (unstable) `develop` branch, use `docker pull
|
||||
evennia/evennia:develop`.
|
||||
docker pull evennia/evennia:develop
|
||||
|
||||
Next `cd` to a place where your game dir is, or where you want to create it. Then run:
|
||||
gets the image based off Evennia's unstable `develop` branch.
|
||||
|
||||
docker run -it --rm -p 4000:4000 -p 4001:4001 -p 4002:4002 --rm -v $PWD:/usr/src/game --user
|
||||
$UID:$GID evennia/evennia
|
||||
Next, `cd` to a place where your game dir is, or where you want to create it. Then run:
|
||||
|
||||
```bash
|
||||
docker run -it --rm -p 4000:4000 -p 4001:4001 -p 4002:4002 --rm -v $PWD:/usr/src/game --user $UID:$GID evennia/evennia
|
||||
```
|
||||
|
||||
Having run this (see next section for a description of what's what), you will be at a prompt inside
|
||||
the docker container:
|
||||
@ -34,8 +33,8 @@ evennia|docker /usr/src/game $
|
||||
This is a normal shell prompt. We are in the `/usr/src/game` location inside the docker container.
|
||||
If you had anything in the folder you started from, you should see it here (with `ls`) since we
|
||||
mounted the current directory to `usr/src/game` (with `-v` above). You have the `evennia` command
|
||||
available and can now proceed to create a new game as per the [Setup Quickstart](./Installation.md)
|
||||
instructions (you can skip the virtualenv and install 'globally' in the container though).
|
||||
available and can now proceed to create a new game as per the normal [game setup](./Installation.md)
|
||||
instructions (no virtualenv needed).
|
||||
|
||||
You can run Evennia from inside this container if you want to, it's like you are root in a little
|
||||
isolated Linux environment. To exit the container and all processes in there, press `Ctrl-D`. If you
|
||||
@ -46,14 +45,7 @@ by `root`. If you want to edit the files outside of the container you should cha
|
||||
On Linux/Mac you do this with `sudo chown myname:myname -R mygame`, where you replace `myname` with
|
||||
your username and `mygame` with whatever your game folder is named.
|
||||
|
||||
### Description of the `docker run` command
|
||||
|
||||
```bash
|
||||
docker run -it --rm -p 4000:4000 -p 4001:4001 -p 4002:4002 --rm -v $PWD:/usr/src/game --user
|
||||
$UID:$GID evennia/evennia
|
||||
```
|
||||
|
||||
This is what it does:
|
||||
Below is an explanation of the `docker run` command we used:
|
||||
|
||||
- `docker run ... evennia/evennia` tells us that we want to run a new container based on the
|
||||
`evennia/evennia` docker image. Everything in between are options for this. The `evennia/evennia` is
|
||||
@ -100,14 +92,14 @@ container comes up. If you already have a game folder with a database set up you
|
||||
docker container and pass commands directly to it. The command you pass will be the main process to
|
||||
run in the container. From your game dir, run for example this command:
|
||||
|
||||
docker run -it --rm -p 4000:4000 -p 4001:4001 -p 4002:4002 --rm -v $PWD:/usr/src/game
|
||||
evennia/evennia evennia start -l
|
||||
docker run -it --rm -p 4000:4000 -p 4001:4001 -p 4002:4002 --rm -v $PWD:/usr/src/game evennia/evennia evennia start -l
|
||||
|
||||
This will start Evennia as the foreground process, echoing the log to the terminal. Closing the
|
||||
terminal will kill the server. Note that you *must* use a foreground command like `evennia start -l`
|
||||
or `evennia ipstart` to start the server - otherwise the foreground process will finish immediately
|
||||
and the container go down.
|
||||
### Create your own game image
|
||||
|
||||
## Create your own game image
|
||||
|
||||
These steps assume that you have created or otherwise obtained a game directory already. First, `cd`
|
||||
to your game dir and create a new empty text file named `Dockerfile`. Save the following two lines
|
||||
|
||||
@ -75,7 +75,7 @@ Concepts/TextTags
|
||||
Concepts/Using-MUX-as-a-Standard
|
||||
Concepts/Web-Features
|
||||
Concepts/Zones
|
||||
Contribs/Arxcode-installing-help
|
||||
Contribs/Arxcode-Installation
|
||||
Contribs/Building-menus
|
||||
Contribs/Contrib-AWSStorage
|
||||
Contribs/Contrib-Auditing
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
# general
|
||||
attrs >= 19.2.0
|
||||
django == 4.0.2
|
||||
django < 4.1
|
||||
twisted >= 21.7.0, < 22.0.0
|
||||
pytz
|
||||
djangorestframework >= 3.13.1, < 3.14
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user