docker fix

This commit is contained in:
HappyHakunaMatata 2024-08-11 23:21:16 +02:00
parent a4284cf854
commit 0321b73448
3 changed files with 182 additions and 108 deletions

View file

@ -5,8 +5,7 @@ WORKDIR /src
ENV CGO_ENABLED=0
RUN apk add git && ./build && go build -o /src/genkeys cmd/genkeys/main.go
RUN apk add --no-cache git curl && ./build && go build -o /src/genkeys cmd/genkeys/main.go
FROM docker.io/alpine
COPY --from=builder /src/yggdrasil /usr/bin/yggdrasil

View file

@ -4,10 +4,10 @@ set -e
CONF_DIR="/etc/yggdrasil-network"
if [ ! -f "$CONF_DIR/config.conf" ]; then
echo "generate $CONF_DIR/config.conf"
yggdrasil --genconf > "$CONF_DIR/config.conf"
if [ ! -f "$CONF_DIR/yggdrasil.conf" ]; then
echo "generate $CONF_DIR/yggdrasil.conf"
yggdrasil genconf -j > "$CONF_DIR/yggdrasil.conf"
fi
yggdrasil --useconf < "$CONF_DIR/config.conf"
yggdrasil run --useconf -l trace < "$CONF_DIR/yggdrasil.conf"
exit $?