6 Commits

Author SHA1 Message Date
idk
11d1479dcf version bump 2020-05-06 22:14:58 -04:00
idk
82b8f97ba4 go back to a named volume for containers 2020-05-06 21:40:03 -04:00
idk
9ed8caaec3 Something not right with the key volume on user installs 2020-05-06 21:38:53 -04:00
idk
54edb1b12e Something not right with the key volume on user installs 2020-05-06 21:29:48 -04:00
idk
824441fa69 Something not right with the key volume on user installs 2020-05-06 21:19:14 -04:00
idk
da1beba872 fix version number 2020-05-06 20:36:20 -04:00
6 changed files with 37 additions and 21 deletions

View File

@@ -11,4 +11,4 @@ RUN apt-get update && \
RUN /usr/lib/go-1.13/bin/go build -v -tags netgo -ldflags '-w -extldflags "-static"'
USER $I2P_UID
WORKDIR /var/lib/i2p/i2p-config/reseed
ENTRYPOINT [ "/var/lib/i2p/go/src/github.com/eyedeekay/i2p-tools-1/i2p-tools-1", "reseed", "--yes=true", "--netdb=/var/lib/i2p/i2p-config/netDb" ]
ENTRYPOINT [ "/var/lib/i2p/go/src/github.com/eyedeekay/i2p-tools-1/entrypoint.sh" ]

View File

@@ -1,5 +1,5 @@
VERSION=0.0.3
VERSION=0.0.4
APP=i2p-tools-1
USER_GH=eyedeekay
@@ -14,6 +14,8 @@ MIN_GO_VERSION?=1.13
I2P_UID=$(shell id -u i2psvc)
I2P_GID=$(shell id -g i2psvc)
WHOAMI=$(shell whoami)
echo:
@echo "type make version to do release $(APP) $(VERSION) $(GOOS) $(GOARCH) $(MIN_GO_VERSION) $(I2P_UID) $(I2P_GID)"
@@ -107,18 +109,29 @@ docker-server:
--publish 8443:8443 \
--restart=always \
--volume /var/lib/i2p/i2p-config/netDb:/var/lib/i2p/i2p-config/netDb:z \
--volume /var/lib/i2p/i2p-config/reseed-keys:/var/lib/i2p/i2p-config/reseed \
--volume reseed-keyss:/var/lib/i2p/i2p-config/reseed \
eyedeekay/reseed \
--signer=hankhill19580@gmail.com
docker logs -f reseed
docker-run:
docker run --rm -itd \
docker run -itd \
--name reseed \
--user $(I2P_UID) \
--group-add $(I2P_GID) \
--publish 8443:8443 \
--volume /var/lib/i2p/i2p-config/netDb:/var/lib/i2p/i2p-config/netDb:z \
--volume /var/lib/i2p/i2p-config/reseed-keys:/var/lib/i2p/i2p-config/reseed \
--volume reseed-keys:/var/lib/i2p/i2p-config/reseed \
eyedeekay/reseed \
--signer=hankhill19580@gmail.com
docker-homerun:
docker run -itd \
--name reseed \
--user 1000 \
--group-add 1000 \
--publish 8443:8443 \
--volume $(HOME)/i2p/netDb:/var/lib/i2p/i2p-config/netDb:z \
--volume reseed-keys:/var/lib/i2p/i2p-config/reseed:z \
eyedeekay/reseed \
--signer=hankhill19580@gmail.com

View File

@@ -24,8 +24,8 @@ and group inside the container as I2P.
When you run a reseed under Docker in this fashion, it will automatically
generate a self-signed certificate for your reseed server in a Docker volume
under your I2P directory. *Back up this directory*, if it is lost it is
impossible to reproduce.
mamed reseed-keys. *Back up this directory*, if it is lost it is impossible
to reproduce.
Please note that Docker is not currently compatible with .onion reseeds unless
you pass the --network=host tag.
@@ -37,7 +37,7 @@ you pass the --network=host tag.
--publish 443:8443 \
--restart always \
--volume $HOME/.i2p/netDb:$HOME/.i2p/netDb:z \
--volume $HOME/i2p/reseed-keys:/var/lib/i2p/i2p-config/reseed \
--volume reseed-keys:/var/lib/i2p/i2p-config/reseed \
eyedeekay/reseed \
--signer $YOUR_EMAIL_HERE
@@ -50,7 +50,7 @@ you pass the --network=host tag.
--publish 443:8443 \
--restart always \
--volume /PATH/TO/USER/I2P/HERE/netDb:/var/lib/i2p/i2p-config/netDb:z \
--volume /PATH/TO/USER/I2P/HERE/reseed-keys:/var/lib/i2p/i2p-config/reseed \
--volume reseed-keys:/var/lib/i2p/i2p-config/reseed \
eyedeekay/reseed \
--signer $YOUR_EMAIL_HERE
@@ -68,7 +68,7 @@ work for you. In that case, just copy-and-paste:
--publish 443:8443 \
--restart always \
--volume /var/lib/i2p/i2p-config/netDb:/var/lib/i2p/i2p-config/netDb:z \
--volume /var/lib/i2p/i2p-config/reseed-keys:/var/lib/i2p/i2p-config/reseed \
--volume reseed-keys:/var/lib/i2p/i2p-config/reseed \
eyedeekay/reseed \
--signer $YOUR_EMAIL_HERE

View File

@@ -227,7 +227,7 @@ func reseedAction(c *cli.Context) {
}
// prompt to create tls keys if they don't exist?
auto := c.Bool("yes")
auto := c.Bool("yes")
err := checkOrNewTLSCert(i2pTlsHost, &i2pTlsCert, &i2pTlsKey, auto)
if nil != err {
log.Fatalln(err)
@@ -267,7 +267,7 @@ func reseedAction(c *cli.Context) {
}
// prompt to create tls keys if they don't exist?
auto := c.Bool("yes")
auto := c.Bool("yes")
err := checkOrNewTLSCert(onionTlsHost, &onionTlsCert, &onionTlsKey, auto)
if nil != err {
log.Fatalln(err)
@@ -289,7 +289,7 @@ func reseedAction(c *cli.Context) {
}
// prompt to create tls keys if they don't exist?
auto := c.Bool("yes")
auto := c.Bool("yes")
err := checkOrNewTLSCert(tlsHost, &tlsCert, &tlsKey, auto)
if nil != err {
log.Fatalln(err)
@@ -309,7 +309,7 @@ func reseedAction(c *cli.Context) {
}
// load our signing privKey
auto := c.Bool("yes")
auto := c.Bool("yes")
privKey, err := getOrNewSigningCert(&signerKey, signerID, auto)
if nil != err {
log.Fatalln(err)

View File

@@ -42,14 +42,14 @@ func signerFile(signerID string) string {
func getOrNewSigningCert(signerKey *string, signerID string, auto bool) (*rsa.PrivateKey, error) {
if _, err := os.Stat(*signerKey); nil != err {
fmt.Printf("Unable to read signing key '%s'\n", *signerKey)
if !auto {
fmt.Printf("Would you like to generate a new signing key for %s? (y or n): ", signerID)
reader := bufio.NewReader(os.Stdin)
input, _ := reader.ReadString('\n')
if []byte(input)[0] != 'y' {
return nil, fmt.Errorf("A signing key is required")
if !auto {
fmt.Printf("Would you like to generate a new signing key for %s? (y or n): ", signerID)
reader := bufio.NewReader(os.Stdin)
input, _ := reader.ReadString('\n')
if []byte(input)[0] != 'y' {
return nil, fmt.Errorf("A signing key is required")
}
}
}
if err := createSigningCertificate(signerID); nil != err {
return nil, err
}

3
entrypoint.sh Executable file
View File

@@ -0,0 +1,3 @@
#! /usr/bin/env sh
/var/lib/i2p/go/src/github.com/eyedeekay/i2p-tools-1/i2p-tools-1 reseed --yes=true --netdb=/var/lib/i2p/i2p-config/netDb $@