oxen-io / oxen-docker

central place for docker related things
8 stars 7 forks source link

Support for different architectures on docker and serving external IPs #19

Open ballerburg9005 opened 1 year ago

ballerburg9005 commented 1 year ago

The current docker images build only for amd64 and thus cannot be run on Rasperry Pi or other machines.

You can use docker buildx to build multi-architecture as outlined in this howto:

https://ballerburg.us.to/howto-multi-architecture-builds-in-docker/

However, since this requires multiple small alterations on the build server, I am reluctant to create a PR for this.

Additionally, a common docker setup for darknet/altnet websites would look like this:

docker run --name HTTP -h http -v ${MY_HOST_DIR}/httpd:/var/www -d mylocalpkg/arm:lighttpd &
docker run --name TOR -d --link HTTP:httpd -v ${MY_HOST_DIR}/tor:/etc/tor mylocalpkg/arm:tor &
docker run --name I2P -d --link HTTP:httpd -p 10500:10500/udp -p 7070:7070 -v ${MY_HOST_DIR}/i2pd:/home/i2pd/data mylocalpkg/arm:i2p &

I had a brief look at the docker file, and it does not seem that it checks if the config directory is empty (because it was mounted as a docker volume). When an empty config directory is found, the image should automatically populate it with default config files.

Docker images are very useful on embedded systems, such as as TV box or a self-hosted server, so I would consider this a priority for a decentralized internet protocol.

majestrate commented 1 year ago

On Sat, 06 May 2023 07:17:28 -0700 ballerburg9005 @.***> wrote:

The current docker images build only for amd64 and thus cannot be run on Rasperry Pi or other machines.

You can use docker buildx to build multi-architecture as outlined in this howto:

https://ballerburg.us.to/howto-multi-architecture-builds-in-docker/

However, since this requires multiple small alterations on the build server, I am reluctant to create a PR for this.

a PR for that would be useful.

Additionally, a common docker setup for darknet/altnet websites would look like this:


docker run --name HTTP -h http -v ${MY_HOST_DIR}/httpd:/var/www -d
mylocalpkg/arm:lighttpd & docker run --name TOR -d --link HTTP:httpd
-v ${MY_HOST_DIR}/tor:/etc/tor mylocalpkg/arm:tor & docker run --name
I2P -d --link HTTP:httpd -p 10500:10500/udp -p 7070:7070 -v
${MY_HOST_DIR}/i2pd:/home/i2pd/data mylocalpkg/arm:i2p & ```

Additionally, I had a brief look at the docker file, and it does not
seem that it checks if the config directory is empty (because it was
mounted as a docker volume). When an empty config directory is found,
the image should automatically populate it with default config files.

i agree that it should do that. lokinet -g can auto generate a placeholder config in current working directory.

Docker images are very useful on embedded systems, such as as TV box or a self-hosted server, so I would consider this a priority for a decentralized internet protocol.

-- ~jeff

ballerburg9005 commented 1 year ago

Ok, thanks. I will make a PR soon.