Add docker usage

This commit is contained in:
idk
2022-09-28 22:32:31 -04:00
parent bb3e14ab37
commit c4ce8a7962
6 changed files with 42 additions and 0 deletions

5
.dockerignore Normal file
View File

@ -0,0 +1,5 @@
i2pkeys
onionkeys
tlskeys
CercaForum
about.i2p

19
DOCKER.md Normal file
View File

@ -0,0 +1,19 @@
# Docker usage
If you want to run it in docker, just clone the repository
```sh
git clone https://github.com/eyedeekay/about.i2p
```
Edit the `env.sh` file to contain a cookie `authkey`
```sh
export AUTH_KEY="secure key"
```
and run `./docker.sh`
```sh
./docker.sh
```

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM golang
ADD . /usr/src/about.i2p
WORKDIR /usr/src/about.i2p
RUN adduser --home /home/user --gecos "user,,,," --disabled-password user
RUN git clone https://github.com/eyedeekay/cerca ../../cblgh/cerca && \
go build && \
cp about.i2p /usr/bin/about.i2p
WORKDIR /home/user/about.i2p
CMD about.i2p

0
abouti2p/allow.txt Normal file
View File

8
docker.sh Executable file
View File

@ -0,0 +1,8 @@
#! /usr/bin/env sh
wd=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
## AUTH_KEY variable is in this file, edit it
. env.sh
docker build -t eyedeekay/about.i2p .
docker rm -f about.i2p
docker run -d --net=host --restart=always --name=about.i2p --volume="${wd}/abouti2p":/home/user/about.i2p eyedeekay/about.i2p about.i2p --authkey="${AUTH_KEY}"

1
env.sh Normal file
View File

@ -0,0 +1 @@
export AUTH_KEY="0" ##!IMPORTANT edit this file if you intend to use docker.sh