mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
rewrite Dockerfile to use multi-stage docker build and replace gosu with
su-exec
This commit is contained in:
parent
e77037c2b8
commit
40d2dea123
2 changed files with 65 additions and 0 deletions
24
build/docker/entrypoint.sh
Normal file
24
build/docker/entrypoint.sh
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
ARGS=""
|
||||
if [ "${ENABLE_IPV6}" != "" ]; then
|
||||
ARGS="${ARGS} –ipv6"
|
||||
fi
|
||||
|
||||
if [ "${LOGLEVEL}" != "" ]; then
|
||||
ARGS="${ARGS} –loglevel=${LOGLEVEL}"
|
||||
fi
|
||||
|
||||
if [ "${ENABLE_AUTH}" != "" ]; then
|
||||
ARGS="${ARGS} –http.auth"
|
||||
fi
|
||||
|
||||
|
||||
# To make ports exposeable
|
||||
DEFAULT_ARGS=" –http.address=0.0.0.0 –httpproxy.address=0.0.0.0 -socksproxy.address=0.0.0.0 –sam.address=0.0.0.0 –bob.address=0.0.0.0 –i2cp.address=0.0.0.0 –i2pcontrol.port=0.0.0.0 –upnp.enabled=false -service "
|
||||
|
||||
chown -R i2pd:nobody /var/lib/i2pd && chmod u+rw /var/lib/i2pd
|
||||
|
||||
su-exec i2pd i2pd $DEFAULT_ARGS $ARGS
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue