mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	docker fix
This commit is contained in:
		
							parent
							
								
									a4284cf854
								
							
						
					
					
						commit
						0321b73448
					
				
					 3 changed files with 182 additions and 108 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 $?
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue