# Gopher Server This is a dockerized version of a Gopher server. This container and its documentation was made by [tiyn](https://github.com/tiyn). ## Setup Navigate into the `src` directory and build the image using the following command. ```sh docker build . -t gopher-server ``` Then create a `rebuild.sh` file. Change the settings accoding to your needs and run `./rebuild.sh` afterward. ### Environment-variables Set the following variables with the -e tag. | Name | Usage | Default | | ------------- | --------------------------------------------------- | ----------- | | `SERVER_NAME` | set this to your IP/Domain (no "gopher://" needed!) | `localhost` | ### Volumes Set the following volumes with the -v tag. | Outside mount/volume name | Container mount | Description | | ------------------------- | --------------- | ----------------------------- | | `gopherwebdir` | `/var/gopher` | directory for the gopher page | ### Ports Set the following ports with the -p tag. | Container port | Recommended outside port | Protocol | Description | | -------------- | ------------------------ | -------- | ---------------------------- | | `70` | `70` | TCP | port for the gopher-protocol | ## Example run-command Run `docker build . -t gopher-server` in the `src` directory of this repository to build the image. A container can be started with the following command. ### rebuild.sh ```sh docker stop gopher-server docker rm gopher-server docker run --name gopher-server -v gopherwebdir:/var/gopher -p 70:70 --restart unless-stopped -e SERVER_NAME=localhost -d gopher-server ```