mirror of
https://github.com/tiyn/dockerfiles.git
synced 2025-12-30 21:29:47 +01:00
gopher-server: updated README
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
# Gopher Server
|
||||
|
||||
This is a dockerized version of a Gopher server.
|
||||
This container and its documentation was made by [tiyn](https://github.com/tiyn).
|
||||
|
||||
## Environment-variables
|
||||
## 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.
|
||||
|
||||
@@ -10,15 +22,15 @@ Set the following variables with the -e tag.
|
||||
| ------------- | --------------------------------------------------- | ----------- |
|
||||
| `SERVER_NAME` | set this to your IP/Domain (no "gopher://" needed!) | `localhost` |
|
||||
|
||||
## Volumes
|
||||
### Volumes
|
||||
|
||||
Set the following volumes with the -v tag.
|
||||
|
||||
| Volume-Name | Container mount | Description |
|
||||
| -------------- | --------------- | ----------------------------- |
|
||||
| Outside mount/volume name | Container mount | Description |
|
||||
| ------------------------- | --------------- | ----------------------------- |
|
||||
| `gopherwebdir` | `/var/gopher` | directory for the gopher page |
|
||||
|
||||
## Ports
|
||||
### Ports
|
||||
|
||||
Set the following ports with the -p tag.
|
||||
|
||||
@@ -28,6 +40,14 @@ Set the following ports with the -p tag.
|
||||
|
||||
## Example run-command
|
||||
|
||||
Run `docker build . -t gopher-server` in the top directory of this repository.
|
||||
Run `docker build . -t gopher-server` in the `src` directory of this repository to build the image.
|
||||
|
||||
`docker run --name gopher-server -v gopherwebdir:/var/gopher -p 70:70 --restart unless-stopped -e SERVER_NAME=<domain/ip_here> -d gopher-server`
|
||||
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
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
MAINTAINER mail@martenkante.de
|
||||
LABEL maintainer="Marten B. Kante <tiyn@posteo.eu>"
|
||||
|
||||
ENV SERVER_NAME localhost
|
||||
|
||||
|
||||
Reference in New Issue
Block a user